Represents a webhook.
Name | Constraints | Optional | Default | Description |
---|---|---|---|---|
Type | WebhookType | Yes | WebhookType | None |
Readonly
channel: TextChannel | VoiceChannel | AnnouncementChannel | StageChannel | ForumChannel | MediaChannel | null
The channel the webhook belongs to
The owner of the webhook
sourceChannel:Type extends WebhookType.ChannelFollower ? AnnouncementChannel | APIPartialChannel : null
The source channel of the webhook
token:Type extends WebhookType.Incoming ? string : Type extends WebhookType.ChannelFollower ? null : string | null
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 |
Deletes the webhook.
Name | Type | Optional | Description |
---|---|---|---|
reason | string | Yes | Reason for deleting this webhook |
Delete a message that was sent by this webhook.
Name | Type | Optional | Description |
---|---|---|---|
message | MessageResolvable | '@original' | No | The message to delete |
threadId | Snowflake | Yes | The id of the thread this message belongs to |
Edits this webhook.
Name | Type | Optional | Description |
---|---|---|---|
options | WebhookEditOptions | No | Options for editing the webhook |
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. |
Whether this webhook is created by an application.
Whether or not this webhook is a channel follower webhook.
Whether or not this webhook is an incoming webhook.
Whether this webhook is created by a user.
Sends a message with this webhook.
Example
Example
Example
Example
Example
Name | Type | Optional | Description |
---|---|---|---|
options | string | MessagePayload | WebhookMessageCreateOptions | No | The options to provide |
Sends a raw slack message with this webhook.
Example
Name | Type | Optional | Description |
---|---|---|---|
body | object | No | The raw body to send |