Class: WebhookClient<T>
Type parameters
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new WebhookClient<T>(options): WebhookClient<T>
Creates a new WebhookClient instance.
Type parameters
Parameters
Returns
WebhookClient<T>
Defined in
src/structures/WebhookClient.ts:29Properties
API
•Private API: WebhooksAPI
Defined in
src/structures/WebhookClient.ts:22id
•Readonly id: string
Defined in
src/structures/WebhookClient.ts:19token
•Readonly token: string
Defined in
src/structures/WebhookClient.ts:20Methods
delete
▸ delete(reason): Promise<void>
Deletes the resource with the given reason.
Parameters
Returns
Promise<void>
A promise that resolves with the result of the deletion operation.
Defined in
src/structures/WebhookClient.ts:71deleteMessage
▸ deleteMessage(messageId, options?): Promise<void>
Deletes a webhook message.
Parameters
Returns
Promise<void>
A promise that resolves once the message is deleted.
Defined in
src/structures/WebhookClient.ts:115edit
▸ edit(data): Promise<APIWebhook>
Edits the webhook with the provided data.
Parameters
Returns
Promise<APIWebhook>
A promise that resolves to the edited webhook.
Defined in
src/structures/WebhookClient.ts:58editMessage
▸ editMessage(messageId, data): Promise<APIMessage>
Edits a previously sent webhook message.
Parameters
Returns
Promise<APIMessage>
A promise that resolves to the edited message.
Defined in
src/structures/WebhookClient.ts:98fetchMessage
▸ fetchMessage(messageId, query?): Promise<APIMessage>
Fetches a message that was created by the webhook.
Parameters
Returns
Promise<APIMessage>
A promise that resolves to the fetched message.
Defined in
src/structures/WebhookClient.ts:129send
▸ send(data): Promise<APIMessage>
Sends the provided data using the API’s execute method.
Parameters
Returns
Promise<APIMessage>
A promise that resolves to the result of the execute method.
