Skip to main content

Class: Webhook

Constructors

constructor

new Webhook(options)

Parameters

NameType
optionsWebhookOptions

Defined in

packages/libcord/src/structures/Webhook.ts:28

Properties

avatar_url

Optional avatar_url: string

Defined in

packages/libcord/src/structures/Webhook.ts:27


id

id: string

Defined in

packages/libcord/src/structures/Webhook.ts:23


token

token: string

Defined in

packages/libcord/src/structures/Webhook.ts:24


username

Optional username: string

Defined in

packages/libcord/src/structures/Webhook.ts:26

Methods

execute

execute(options): Promise<undefined | Webhook>

Sends a message to a webhook

Parameters

NameTypeDescription
optionsstring | executeWebhookOptionsthe payload for the webhook

Returns

Promise<undefined | Webhook>

Defined in

packages/libcord/src/structures/Webhook.ts:57


send

send(options): Promise<undefined | Webhook>

Sends a message to a webhook

Deprecated

Parameters

NameTypeDescription
optionsstring | executeWebhookOptionsthe payload for the webhook

Returns

Promise<undefined | Webhook>

Defined in

packages/libcord/src/structures/Webhook.ts:49


setAvatar

setAvatar(url): Webhook

Parameters

NameType
urlstring

Returns

Webhook

Defined in

packages/libcord/src/structures/Webhook.ts:39


setUsername

setUsername(username): Webhook

Parameters

NameType
usernamestring

Returns

Webhook

Defined in

packages/libcord/src/structures/Webhook.ts:35