WebhooksAPI

export declare class WebhooksAPI
export declare class WebhooksAPI

No summary provided.

constructor(rest)
Constructs a new instance of the WebhooksAPI class
NameTypeOptionalDescription
restRESTNoNone
delete(id, options?):Promise<void>
NameTypeOptionalDescription
idSnowflakeNo
The id of the webhook to delete
optionsPick<RequestData, 'reason' | 'signal'> & { token?: string | undefined; }Yes
The options for deleting the webhook
deleteMessage(id, token, messageId, query?, options?):Promise<void>
Deletes an associated message from a webhook
NameTypeOptionalDescription
idSnowflakeNo
The id of the webhook
tokenstringNo
The token of the webhook
messageIdSnowflakeNo
The id of the message to delete
query{ thread_id?: Snowflake; }Yes
The options for deleting the message
optionsPick<RequestData, 'signal'>Yes
The options for deleting the message
edit(id, body, options?):Promise<APIWebhook>
NameTypeOptionalDescription
idSnowflakeNo
The id of the webhook to edit
bodyRESTPatchAPIWebhookJSONBodyNo
The new webhook data
optionsPick<RequestData, 'reason' | 'signal'> & { token?: string | undefined; }Yes
The options for editing the webhook
editMessage(id, token, messageId, body, options?):Promise<APIMessage>
Edits an associated message from a webhook
NameTypeOptionalDescription
idSnowflakeNo
The id of the webhook
tokenstringNo
The token of the webhook
messageIdSnowflakeNo
The id of the message to edit
bodyEditWebhookMessageOptionsNo
The data for editing the message
optionsPick<RequestData, 'signal'>Yes
The options for editing the message
execute(id, token, body, options?):Promise<RESTPostAPIWebhookWithTokenWaitResult>
Executes a webhook and returns the created message
NameTypeOptionalDescription
idSnowflakeNo
The id of the webhook
tokenstringNo
The token of the webhook
bodyCreateWebhookMessageOptions & { wait: true; }No
The data for executing the webhook
optionsPick<RequestData, 'signal'>Yes
The options for executing the webhook
executeGitHub(id, token, body, query?, options?):Promise<void>
NameTypeOptionalDescription
idSnowflakeNo
The id of the webhook
tokenstringNo
The token of the webhook
bodyunknownNo
The data for executing the webhook
queryRESTPostAPIWebhookWithTokenGitHubQueryYes
The options for executing the webhook
optionsPick<RequestData, 'signal'>Yes
The options for executing the webhook
executeSlack(id, token, body, query?, options?):Promise<void>
NameTypeOptionalDescription
idSnowflakeNo
The id of the webhook
tokenstringNo
The token of the webhook
bodyunknownNo
The data for executing the webhook
queryRESTPostAPIWebhookWithTokenSlackQueryYes
The query options for executing the webhook
optionsPick<RequestData, 'signal'>Yes
The options for executing the webhook
get(id, options?):Promise<APIWebhook>
NameTypeOptionalDescription
idSnowflakeNo
The id of the webhook
optionsPick<RequestData, 'signal'> & { token?: string | undefined; }Yes
The options for fetching the webhook
getMessage(id, token, messageId, query?, options?):Promise<APIMessage>
Fetches an associated message from a webhook
NameTypeOptionalDescription
idSnowflakeNo
The id of the webhook
tokenstringNo
The token of the webhook
messageIdSnowflakeNo
The id of the message to fetch
queryRESTGetAPIWebhookWithTokenMessageQueryYes
The query options for fetching the message
optionsPick<RequestData, 'signal'>Yes
The options for fetching the message