Webhook
Represents a webhook
Hierarchy
Base
<string
>↳
Webhook
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new Webhook(data
, client
)
Create a new Webhook
Parameters
Name | Type | Description |
---|---|---|
data | RawWebhook | The data of the webhook |
client | Client | The client |
Overrides
Defined in
Properties
channelID
• channelID: string
The ID of the channel the webhook is in
Defined in
client
• client: Client
The bot client
Inherited from
Defined in
createdAt
• createdAt: Date
The date the webhook was created at
Defined in
createdBy
• createdBy: string
The ID of the user that created the webhook
Defined in
deletedAt
• deletedAt: Date
The date the webhook was deleted
Defined in
id
• id: string
The ID of the item
Inherited from
Defined in
name
• name: string
The name of the webhook
Defined in
serverID
• serverID: string
The ID of the server the webhook is in
Defined in
token
• token: string
The token of the webhook
Defined in
Methods
delete
▸ delete(): Promise
<void
>
Delete the webhook
Returns
Promise
<void
>
Defined in
edit
▸ edit(options
): Promise
<Webhook
>
Edit the webhook
Parameters
Name | Type | Description |
---|---|---|
options | WebhookEditOptions | The options to edit the webhook with |
Returns
Promise
<Webhook
>
Defined in
toJSON
▸ toJSON(): WebhookData
Returns the JSON representation of the item
Returns
Overrides
Defined in
update
▸ Protected
update(data
): void
Parameters
Name | Type |
---|---|
data | RawWebhook |
Returns
void