Represents a webhook.
Extends
WebhookMixin()Readonly
channel:TextChannel | VoiceChannel | NewsChannel | StageChannel | ForumChannel | MediaChannel | null
The channel the webhook belongs to
The token for the webhook, unavailable for follower webhooks and webhooks owned by another application.
A link to the webhook's avatar.
Returns
Name | Type | Optional | Description |
---|---|---|---|
options | ImageURLOptions | Yes | Options for the image URL |
Edits a message that was sent by this webhook.
Returns
Returns the message edited by this webhookName | Type | Optional | Description |
---|---|---|---|
message | MessageResolvable | No | The message to edit |
options | string | MessagePayload | WebhookMessageEditOptions | No | The options to provide |
Gets a message that was sent by this webhook.
Returns
Returns the message sent by this webhookName | Type | Optional | Description |
---|---|---|---|
message | Snowflake | No | The id of the message to fetch |
options | WebhookFetchMessageOptions | Yes | The options to provide to fetch the message. |
isApplicationCreated():this is this & {
type: WebhookType.Application;
applicationId: Snowflake;
owner: User | APIUser;
}
Whether this webhook is created by an application.
isChannelFollower():this is this & {
type: WebhookType.ChannelFollower;
sourceGuild: Guild | APIPartialGuild;
sourceChannel: NewsChannel | APIPartialChannel;
token: null;
applicationId: null;
owner: User | APIUser;
}
Whether or not this webhook is a channel follower webhook.
Whether or not this webhook is an incoming webhook.
isUserCreated():this is this & {
type: WebhookType.Incoming;
applicationId: null;
owner: User | APIUser;
}
Whether this webhook is created by a user.
Sends a message with this webhook.
Name | Type | Optional | Description |
---|---|---|---|
options | string | MessagePayload | WebhookMessageCreateOptions | No | The options to provide |