We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4eaa09f commit 5d0a19bCopy full SHA for 5d0a19b
interactions/api/http/webhook.py
@@ -105,7 +105,7 @@ async def execute_webhook(
105
webhook_id: int,
106
webhook_token: str,
107
payload: dict,
108
- wait: bool = False,
+ wait: Optional[bool] = False,
109
thread_id: Optional[int] = None,
110
) -> Optional[dict]:
111
"""
@@ -119,9 +119,13 @@ async def execute_webhook(
119
:return: The message sent, if wait=True, else None.
120
121
122
+ dct = {"wait": "true" if wait else "false"}
123
+ if thread_id:
124
+ dct["thread_id"] = thread_id
125
+
126
return await self._req.request(
127
Route("POST", f"/webhooks/{webhook_id}/{webhook_token}"),
- params={"wait": wait, "thread_id": thread_id},
128
+ params=dct,
129
json=payload,
130
)
131
0 commit comments