No summary provided.
Constructs a new instance of the
WebhooksAPI class| Name | Type | Optional | Description |
|---|---|---|---|
| rest | REST | No | None |
Creates a new webhook
| Name | Type | Optional | Description |
|---|---|---|---|
| channelId | Snowflake | No | The id of the channel to create the webhook in |
| body | RESTPostAPIChannelWebhookJSONBody | No | The data to use when creating the webhook |
| options | Pick<RequestData, 'reason' | 'signal'> | Yes | The options to use when creating the webhook |
Deletes a webhook
| Name | Type | Optional | Description |
|---|---|---|---|
| id | Snowflake | No | The id of the webhook to delete |
| options | Pick<RequestData, 'reason' | 'signal'> & { token?: string | undefined; } | Yes | The options to use when deleting the webhook |
Deletes an associated message from a webhook
| Name | Type | Optional | Description |
|---|---|---|---|
| id | Snowflake | No | The id of the webhook |
| token | string | No | The token of the webhook |
| messageId | Snowflake | No | The id of the message to delete |
| query | { thread_id?: string; } | Yes | The options to use when deleting the message |
| options | Pick<RequestData, 'signal'> | Yes | The options to use when deleting the message |
Edits a webhook
| Name | Type | Optional | Description |
|---|---|---|---|
| id | Snowflake | No | The id of the webhook to edit |
| body | RESTPatchAPIWebhookJSONBody | No | The new webhook data |
| options | Pick<RequestData, 'reason' | 'signal'> & { token?: string | undefined; } | Yes | The options to use when editing the webhook |
Edits an associated message from a webhook
| Name | Type | Optional | Description |
|---|---|---|---|
| id | Snowflake | No | The id of the webhook |
| token | string | No | The token of the webhook |
| messageId | Snowflake | No | The id of the message to edit |
| body | RESTPatchAPIWebhookWithTokenMessageJSONBody & { thread_id?: string; } | No | The data to use when editing the message |
| options | Pick<RequestData, 'signal'> | Yes | The options to use when editing the message |
Executes a webhook and returns the created message
| Name | Type | Optional | Description |
|---|---|---|---|
| id | Snowflake | No | The id of the webhook |
| token | string | No | The token of the webhook |
| body | RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & { files?: RawFile[]; wait: true; } | No | The data to use when executing the webhook |
| options | Pick<RequestData, 'signal'> | No | The options to use when executing the webhook |
Executes a github webhook
| Name | Type | Optional | Description |
|---|---|---|---|
| id | Snowflake | No | The id of the webhook |
| token | string | No | The token of the webhook |
| query | unknown | No | The options to use when executing the webhook |
| query | RESTPostAPIWebhookWithTokenGitHubQuery | Yes | The options to use when executing the webhook |
| { signal } | Pick<RequestData, 'signal'> | Yes | None |
Executes a slack webhook
| Name | Type | Optional | Description |
|---|---|---|---|
| id | Snowflake | No | The id of the webhook |
| token | string | No | The token of the webhook |
| query | unknown | No | The query options to use when executing the webhook |
| query | RESTPostAPIWebhookWithTokenSlackQuery | Yes | The query options to use when executing the webhook |
| { signal } | Pick<RequestData, 'signal'> | Yes | None |
Fetches a webhook
| Name | Type | Optional | Description |
|---|---|---|---|
| id | Snowflake | No | The id of the webhook |
| token | string | Yes | The token of the webhook |
| options | Pick<RequestData, 'signal'> | Yes | The options to use when fetching the webhook |
Fetches an associated message from a webhook
| Name | Type | Optional | Description |
|---|---|---|---|
| id | Snowflake | No | The id of the webhook |
| token | string | No | The token of the webhook |
| messageId | Snowflake | No | The id of the message to fetch |
| query | RESTGetAPIWebhookWithTokenMessageQuery | Yes | The query options to use when fetching the message |
| options | Pick<RequestData, 'signal'> | Yes | The options to use when fetching the message |