Skip to main content
yor.ts / Exports / Webhook

Class: Webhook

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

• new Webhook(client, data): Webhook Initializes a new instance of the class.

Parameters

Returns

Webhook

Overrides

Base.constructor

Defined in

src/structures/Webhook.ts:27

Properties

avatar

• Optional avatar: string

Defined in

src/structures/Webhook.ts:18

client

• client: YorClient

Inherited from

Base.client

Defined in

src/structures/Base.ts:4

creator

• Optional creator: User

Defined in

src/structures/Webhook.ts:19

id

• id: string

Defined in

src/structures/Webhook.ts:15

raw

• Readonly raw: APIWebhook

Defined in

src/structures/Webhook.ts:13

token

• Optional token: string

Defined in

src/structures/Webhook.ts:17

type

• type: WebhookType

Defined in

src/structures/Webhook.ts:16

Methods

avatarURL

▸ avatarURL(options?): undefined | string Returns the URL of the avatar image for this user.

Parameters

Returns

undefined | string The URL of the avatar image, or undefined if there is no avatar.

Defined in

src/structures/Webhook.ts:80

createClient

▸ createClient(): false | WebhookClient<{ id: string ; token: string }> Creates a client if the call is incoming and returns a new WebhookClient instance.

Returns

false | WebhookClient<{ id: string ; token: string }> A new WebhookClient instance.

Defined in

src/structures/Webhook.ts:44

createdAt

▸ createdAt(): Date Returns the creation date of the object.

Returns

Date The creation date of the object.

Defined in

src/structures/Webhook.ts:70

createdTimestamp

▸ createdTimestamp(): number Returns the created timestamp as a Date object.

Returns

number The created timestamp.

Defined in

src/structures/Webhook.ts:56

isApplicationCreated

▸ isApplicationCreated(): boolean Whether this webhook is created by an application.

Returns

boolean

Defined in

src/structures/Webhook.ts:102

isChannelFollower

▸ isChannelFollower(): boolean Whether or not this webhook is a channel follower webhook.

Returns

boolean

Defined in

src/structures/Webhook.ts:110

isIncoming

▸ isIncoming(): boolean Whether or not this webhook is an incoming webhook.

Returns

boolean

Defined in

src/structures/Webhook.ts:118

isUserCreated

▸ isUserCreated(): boolean Whether this webhook is created by a user.

Returns

boolean

Defined in

src/structures/Webhook.ts:90