Webhook Cache. Includes a DiscordWebhook class
Returns
Promise<void>
Returns
Promise<void>
Parameter Type Default Description channelID String Channel ID to sync webhooks in Returns
Promise<void>
Parameter Type Default Description channelID String Guild ID to sync webhooks in Returns
Promise<void>
Returns
Collection<DiscordWebhook>
- See below for use
Returns
DiscordWebhook | Object
- See below for use. This will only be an object with anid
key if the webhook is not cached.
Returns
Collection<DiscordWebhook>
- See below for use
Parameter Type Default Description data Object Webhook data from Discord API client Client Bot Client
Property Type Description client Client Bot Client type Number 1
is a normal webhook,2
is a channel follower webhookchannel GuildTextableChannel Channel the webhook belongs in name ?String Default name of webhook avatar ?String Default avatar hash of webhook avatarURL String Default avatar URL of webhook guild? Guild | Object Guild the webhook belongs in. This will be an object with an id
key if the guild is not cacheduser? User User that created the webhook token? String Webhook token defaultAvatarURL String Default Discord avatar URL of the webhook
Updates the cached webhook
Parameter Type Default Description data Object Webhook data from Discord API Returns
void
Delete the webhook
Parameter Type Default Description [token] Boolean false Whether to use the webhook token for authentication Returns
Promise<void>
Edits the webhook
Parameter Type Default Description options Object Webhook Options [options.avatar] String The new default avatar as a base64 data URI. Note: base64 strings alone are not base64 data URI strings [options.channelID] String The new channel ID where webhooks should be sent to [options.name] String The new default name [token] Boolean false
Whether to authenticate using the webhook token or not [reason] String The reason to be displayed in audit logs Returns
void
Executes the webhook
Parameter Type Default Description options Object Webhook payload - Please refer to the documentation for details Returns
Promise<void|Message>
- Ifwait
is true, then the message object will be returned
Executes the webhook
Parameter Type Default Description options Object Webhook payload - Please refer to the documentation for details Returns
Promise<void|Message>
- Ifwait
is true, then the message object will be returned