class WebhooksAPI

declare class WebhooksAPI

Constructors

constructor(
rest: REST
)

Constructs a new instance of the WebhooksAPI class

create() : Promise<never>

Creates a new webhook

delete(
options?: { reason?: string; token?: string; }
) : Promise<void>

Deletes a webhook

deleteMessage(
token: string
messageId: Snowflake
options?: { thread_id?: string; }
) : Promise<void>

Deletes an associated message from a webhook

edit(
options?: { reason?: string; token?: string; }
) : Promise<discord_api_types_v10.APIWebhook>

Edits a webhook

editMessage(
token: string
messageId: Snowflake
data: RESTPatchAPIWebhookWithTokenMessageJSONBody & { thread_id?: string; }
) : Promise<discord_api_types_v10.APIMessage>

Edits an associated message from a webhook

Executes a webhook and returns the created message

executeGitHub() : Promise<void>

Executes a github webhook

executeSlack() : Promise<void>

Executes a slack webhook

Fetches a webhook

getMessage(
token: string
messageId: Snowflake
options?: { thread_id?: string; }
) : Promise<discord_api_types_v10.APIMessage>

Fetches an associated message from a webhook