hoshii / Exports / Webhook

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

NameTypeDescription
dataRawWebhookThe data of the webhook
clientClientThe client

Overrides

Base.constructor

Defined in

lib/structures/Webhook.ts:78open in new window

Properties

channelID

channelID: string

The ID of the channel the webhook is in

Defined in

lib/structures/Webhook.ts:41open in new window


client

client: Client

The bot client

Inherited from

Base.client

Defined in

lib/structures/Base.ts:13open in new window


createdAt

createdAt: Date

The date the webhook was created at

Defined in

lib/structures/Webhook.ts:46open in new window


createdBy

createdBy: string

The ID of the user that created the webhook

Defined in

lib/structures/Webhook.ts:51open in new window


deletedAt

deletedAt: Date

The date the webhook was deleted

Defined in

lib/structures/Webhook.ts:56open in new window


id

id: string

The ID of the item

Inherited from

Base.id

Defined in

lib/structures/Base.ts:16open in new window


name

name: string

The name of the webhook

Defined in

lib/structures/Webhook.ts:61open in new window


serverID

serverID: string

The ID of the server the webhook is in

Defined in

lib/structures/Webhook.ts:66open in new window


token

token: string

The token of the webhook

Defined in

lib/structures/Webhook.ts:71open in new window

Methods

delete

delete(): Promise<void>

Delete the webhook

Returns

Promise<void>

Defined in

lib/structures/Webhook.ts:96open in new window


edit

edit(options): Promise<Webhook>

Edit the webhook

Parameters

NameTypeDescription
optionsWebhookEditOptionsThe options to edit the webhook with

Returns

Promise<Webhook>

Defined in

lib/structures/Webhook.ts:105open in new window


toJSON

toJSON(): WebhookData

Returns the JSON representation of the item

Returns

WebhookData

Overrides

Base.toJSON

Defined in

lib/structures/Webhook.ts:109open in new window


update

Protected update(data): void

Parameters

NameType
dataRawWebhook

Returns

void

Overrides

Base.update

Defined in

lib/structures/Webhook.ts:122open in new window

Last Updated:
Contributors: Reinhardt