InteractionWebhook
classe · Source
Represents a webhook for an Interaction Implements: Webhook
Constructor
Parameters
| Name | Type | Description |
|---|---|---|
client | Client | The instantiating client |
id | Snowflake | The application's id |
token | string | The interaction's token |
Properties
client
The client that instantiated the interaction webhook Source
id
The webhook's id Source
url
The URL of this webhook Source
Methods
send
Sends a message with this webhook. Parameters
| Name | Type | Description |
|---|---|---|
options | string | MessagePayload | InteractionReplyOptions | The content for the reply |
Returns: Promise<(Message\|APIMessage)>Source
fetchMessage
Gets a message that was sent by this webhook. Parameters
| Name | Type | Description |
|---|---|---|
message | Snowflake | '@original' | The id of the message to fetch |
cacheOrOptions? | WebhookFetchMessageOptions | boolean | The options to provide to fetch the message. A deprecated boolean may be passed instead to specify whether to cache the message. Default: {}. |
Returns: Promise<(Message\|APIMessage)> — Returns the raw message data if the webhook was instantiated as a WebhookClient or if the channel is uncached, otherwise a Message will be returned Source
editMessage
Edits a message that was sent by this webhook. Parameters
| Name | Type | Description |
|---|---|---|
message | MessageResolvable | '@original' | The message to edit |
options | string | MessagePayload | WebhookEditMessageOptions | The options to provide |
Returns: Promise<(Message\|APIMessage)> — Returns the raw message data if the webhook was instantiated as a WebhookClient or if the channel is uncached, otherwise a Message will be returned Source
deleteMessage
Delete a message that was sent by this webhook. Parameters
| Name | Type | Description |
|---|---|---|
message | MessageResolvable | '@original' | The message to delete |
threadId? | Snowflake | The id of the thread this message belongs to |
Returns: Promise<void>Source