MCPcopy
hub / github.com/Rapptz/discord.py / execute_webhook

Method execute_webhook

discord/webhook/sync.py:283–300  ·  view source on GitHub ↗
(
        self,
        webhook_id: int,
        token: str,
        *,
        session: Session,
        payload: Optional[Dict[str, Any]] = None,
        multipart: Optional[List[Dict[str, Any]]] = None,
        files: Optional[Sequence[File]] = None,
        thread_id: Optional[int] = None,
        wait: bool = False,
        with_components: bool = False,
    )

Source from the content-addressed store, hash-verified

281 return self.request(route, session, reason=reason, payload=payload)
282
283 def execute_webhook(
284 self,
285 webhook_id: int,
286 token: str,
287 *,
288 session: Session,
289 payload: Optional[Dict[str, Any]] = None,
290 multipart: Optional[List[Dict[str, Any]]] = None,
291 files: Optional[Sequence[File]] = None,
292 thread_id: Optional[int] = None,
293 wait: bool = False,
294 with_components: bool = False,
295 ) -> MessagePayload:
296 params = {'wait': int(wait), 'with_components': int(with_components)}
297 if thread_id:
298 params['thread_id'] = thread_id
299 route = Route('POST', '/webhooks/{webhook_id}/{webhook_token}', webhook_id=webhook_id, webhook_token=token)
300 return self.request(route, session, payload=payload, multipart=multipart, files=files, params=params)
301
302 def get_webhook_message(
303 self,

Callers 1

sendMethod · 0.45

Calls 2

requestMethod · 0.95
RouteClass · 0.85

Tested by

no test coverage detected