Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Webhook

Webhook Structure

Hierarchy

Index

Constructors

constructor

Properties

_keys

_keys: BaseSet<string> = keysWebhook

avatar

avatar: null | string = null

channelId

channelId: string = ""

client

client: ShardClient

discriminator

discriminator: string = "0000"

guildId

guildId: string = ""

id

id: string = ""

name

name: string = ""

Optional token

token: null | string

type

type: WebhookTypes = WebhookTypes.INCOMING

Optional user

user: null | User

Accessors

avatarUrl

  • get avatarUrl(): string
  • Returns string

channel

  • Returns Channel | null

createdAt

  • get createdAt(): Date
  • Returns Date

createdAtUnix

  • get createdAtUnix(): number
  • Returns number

defaultAvatarUrl

  • get defaultAvatarUrl(): string
  • Returns string

guild

  • get guild(): Guild | null
  • Returns Guild | null

jumpLink

  • get jumpLink(): string
  • Returns string

mention

  • get mention(): string
  • Returns string

shardId

  • get shardId(): number
  • Returns number

Methods

[inspect.custom]

  • [inspect.custom](): object

_getFromSnake

  • _getFromSnake(key: string): any
  • Parameters

    • key: string

    Returns any

_setFromSnake

  • _setFromSnake(key: string, value: any): any
  • Parameters

    • key: string
    • value: any

    Returns any

avatarUrlFormat

  • avatarUrlFormat(format?: undefined | string, query?: UrlQuery): string
  • Parameters

    • Optional format: undefined | string
    • Optional query: UrlQuery

    Returns string

createMessage

  • createMessage(options: ExecuteWebhook, compatibleType?: undefined | string): Promise<null | Message>
  • Parameters

    • options: ExecuteWebhook
    • Optional compatibleType: undefined | string

    Returns Promise<null | Message>

delete

  • delete(options?: DeleteWebhook): Promise<any>
  • Parameters

    • Default value options: DeleteWebhook = {}

    Returns Promise<any>

difference

  • difference(key: string, value: any): [boolean, any]
  • Parameters

    • key: string
    • value: any

    Returns [boolean, any]

differences

edit

  • edit(options?: EditWebhook): Promise<Webhook>
  • Parameters

    • Default value options: EditWebhook = {}

    Returns Promise<Webhook>

execute

  • execute(options: ExecuteWebhook, compatibleType?: undefined | string): Promise<null | Message>
  • Parameters

    • options: ExecuteWebhook
    • Optional compatibleType: undefined | string

    Returns Promise<null | Message>

merge

mergeValue

  • mergeValue(key: string, value: any): void
  • Parameters

    • key: string
    • value: any

    Returns void

toJSON

  • toJSON(): object
  • Returns object

toString

  • toString(): string
  • Returns string

Generated using TypeDoc