Creates a new WebhookManager instance.
The client instance this manager belongs to
Creates a new webhook in the specified channel.
The ID of the channel where the webhook will be created
The name of the webhook
Optionalavatar: string | Readable | FileOptional avatar for the webhook. Can be a URL string, Readable stream, or File object
Promise resolving to the created webhook response
Deletes a webhook.
The ID of the webhook to delete
The token of the webhook
Promise that resolves when the webhook is deleted
Edits a webhook's properties.
The ID of the webhook to edit
The token of the webhook
The options to edit on the webhook
Promise resolving to the updated webhook response
Retrieves a specific webhook by ID and token.
The ID of the webhook to retrieve
The token of the webhook
Promise resolving to the webhook response
Retrieves all webhooks for the specified channel.
The ID of the channel to get webhooks from
Promise resolving to an array of webhook responses
Retrieves partial information about a webhook using only its ID. This method provides limited webhook information without requiring a token.
The ID of the webhook to retrieve partial information for
Promise resolving to the webhook response with partial information
Sends a message through a webhook.
The ID of the webhook to send the message through
The token of the webhook
The message content. Can be a string or MessageOptions object with attachments and embeds
Promise resolving to the sent message
// Send a simple text message
await client.webhooks.send("webhookId", "token", "Hello, world!");
// Send a message with embeds and attachments
await client.webhooks.send("webhookId", "token", {
content: "Check out this image!",
attachments: ["https://example.com/image.png"],
embeds: [myEmbed]
});
Manages webhooks for the client. Provides methods for creating, managing, and sending messages through webhooks.