Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Webhook

Hierarchy

Index

Constructors

Properties

client: Client

The client that instantiated this structure

Raw Webhook data

Accessors

  • get avatar(): undefined | null | string
  • The webhook avatar's hash

    Returns undefined | null | string

  • get channel(): undefined | Guild
  • The Channel this webhook belongs to

    Returns undefined | Guild

  • get channelId(): undefined | string
  • The Id of the channel the webhook is in

    Returns undefined | string

  • get createdAt(): Date
  • The time the webhook was created at

    Returns Date

  • get createdTimestamp(): number
  • The timestamp the webhook was created at

    Returns number

  • get guild(): undefined | Guild
  • The Guild this webhook belongs to

    Returns undefined | Guild

  • get guildId(): undefined | string
  • The Id of the guild the webhook is in

    Returns undefined | string

  • get id(): string
  • The Id of this webhook

    Returns string

  • get name(): undefined | string
  • The name of this webhook

    Returns undefined | string

  • get sourceChannel(): undefined | Channel
  • The source channel of the webhook

    Returns undefined | Channel

  • get sourceGuild(): undefined | Guild
  • The source guild of the webhook

    Returns undefined | Guild

  • get token(): undefined | string
  • The token of this webhook

    Returns undefined | string

  • The type of the webhook

    Returns undefined | WebhookType

  • get url(): string
  • The URL of this webhook

    Returns string

  • get user(): undefined | User
  • The owner of the webhook

    Returns undefined | User

Methods

  • A link to the webhook's avatar

    Parameters

    Returns null | string

  • clone(): any
  • Returns any

  • delete(): Promise<undefined>
  • Deletes this webhook

    Returns Promise<undefined>

  • deleteMessage(id: string): Promise<undefined>
  • Deletes a message that was sent by this webhook

    Parameters

    • id: string

    Returns Promise<undefined>

  • Edits a message that was sent by this webhook

    example
    const { EmbedBuilder } = require('helly');
    const embed = new EmbedBuilder().setTitle('...world!')
    webhook.editMessage('123456789123456', { content: 'Hello...', embeds: [embed] })
    example
    webhook.editMessage('123456789123456', 'I\'m watching you!')
    

    Parameters

    • id: string

      The Id of the message to edit

    • content: MessageOptions

      The new content of the message

    Returns Promise<Message>

  • fetchMessage(id: string): Promise<Message>
  • Gets a message that was sent by this webhook

    Parameters

    • id: string

    Returns Promise<Message>

  • Parameters

    Returns Webhook

  • Sends a message with this webhook

    example
    const { EmbedBuilder } = require('helly');
    const embed = new EmbedBuilder().setTitle('...world!')
    webhook.send({ content: 'Hello...', embeds: [embed] })
    example
    webhook.send('I\'m watching you!')
    

    Parameters

    Returns Promise<Message>

  • sendSlackMessage(message: Record<string, unknown>): Promise<boolean>

Generated using TypeDoc version 0.22.16, the 9/16/2022 at 1:09:16 AM