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
idSnowflakeNoThe id of the webhook to delete
optionsPick<RequestData, 'reason' | 'signal'> & { token?: string | undefined; }YesThe options for deleting the webhook
deleteMessage(id, token, messageId, query?, options?):Promise<void>
Deletes an associated message from a webhook
NameTypeOptionalDescription
idSnowflakeNoThe id of the webhook
tokenstringNoThe token of the webhook
messageIdSnowflakeNoThe id of the message to delete
query{ thread_id?: Snowflake; }YesThe options for deleting the message
optionsPick<RequestData, 'signal'>YesThe options for deleting the message
edit(id, body, options?):Promise<APIWebhook>
NameTypeOptionalDescription
idSnowflakeNoThe id of the webhook to edit
bodyRESTPatchAPIWebhookJSONBodyNoThe new webhook data
optionsPick<RequestData, 'reason' | 'signal'> & { token?: string | undefined; }YesThe options for editing the webhook
editMessage(id, token, messageId, body, options?):Promise<APIMessage>
Edits an associated message from a webhook
NameTypeOptionalDescription
idSnowflakeNoThe id of the webhook
tokenstringNoThe token of the webhook
messageIdSnowflakeNoThe id of the message to edit
bodyRESTPatchAPIWebhookWithTokenMessageJSONBody & { files?: RawFile[]; thread_id?: string; }NoThe data for editing the message
optionsPick<RequestData, 'signal'>YesThe options for editing the message
execute(id, token, body, options?):Promise<RESTPostAPIWebhookWithTokenWaitResult>
Executes a webhook and returns the created message
NameTypeOptionalDescription
idSnowflakeNoThe id of the webhook
tokenstringNoThe token of the webhook
bodyRESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & { files?: RawFile[]; wait: true; }NoThe data for executing the webhook
optionsPick<RequestData, 'signal'>YesThe options for executing the webhook
executeGitHub(id, token, body, query?, options?):Promise<void>
NameTypeOptionalDescription
idSnowflakeNoThe id of the webhook
tokenstringNoThe token of the webhook
bodyunknownNoThe data for executing the webhook
queryRESTPostAPIWebhookWithTokenGitHubQueryYesThe options for executing the webhook
optionsPick<RequestData, 'signal'>YesThe options for executing the webhook
executeSlack(id, token, body, query?, options?):Promise<void>
NameTypeOptionalDescription
idSnowflakeNoThe id of the webhook
tokenstringNoThe token of the webhook
bodyunknownNoThe data for executing the webhook
queryRESTPostAPIWebhookWithTokenSlackQueryYesThe query options for executing the webhook
optionsPick<RequestData, 'signal'>YesThe options for executing the webhook
get(id, options?):Promise<APIWebhook>
NameTypeOptionalDescription
idSnowflakeNoThe id of the webhook
optionsPick<RequestData, 'signal'> & { token?: string | undefined; }YesThe options for fetching the webhook
getMessage(id, token, messageId, query?, options?):Promise<APIMessage>
Fetches an associated message from a webhook
NameTypeOptionalDescription
idSnowflakeNoThe id of the webhook
tokenstringNoThe token of the webhook
messageIdSnowflakeNoThe id of the message to fetch
queryRESTGetAPIWebhookWithTokenMessageQueryYesThe query options for fetching the message
optionsPick<RequestData, 'signal'>YesThe options for fetching the message