Skip to content

WebhookClient

Defined in: packages/rest/src/webhook.ts:33

Standalone client for sending Discord webhooks.

new WebhookClient(options, restOptions?): WebhookClient

Defined in: packages/rest/src/webhook.ts:40

WebhookClientOptions

number

number

WebhookClient

readonly id: string

Defined in: packages/rest/src/webhook.ts:35

Webhook ID.


readonly token: string

Defined in: packages/rest/src/webhook.ts:37

Webhook security token.

deleteMessage(messageId, options?): Promise<void>

Defined in: packages/rest/src/webhook.ts:127

Deletes a previously sent webhook message.

string

string

Promise<void>


editMessage(messageId, options): Promise<APIMessage>

Defined in: packages/rest/src/webhook.ts:115

Edits a previously sent webhook message. Takes the same options as WebhookClient.send, files included.

string

string | WebhookMessageOptions

Promise<APIMessage>


fetchMessage(messageId, options?): Promise<APIMessage>

Defined in: packages/rest/src/webhook.ts:102

Fetches a message this webhook sent (threadId for a message inside a thread).

string

string

Promise<APIMessage>


send(options): Promise<APIMessage>

Defined in: packages/rest/src/webhook.ts:91

Sends a message to the webhook.

string | WebhookMessageOptions

Promise<APIMessage>