Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebhookClient

The webhook client

Hierarchy

  • WebhookClient

Index

Constructors

  • Parameters

    • client: Client

      A Client instance

    • id: string

      The id of the webhook

    • token: string

      The token of the webhook

    Returns WebhookClient

Properties

id: string

The id of the webhook

token: string

The token of the webhook

webhook: Webhook

The webhook representing this client

Methods

  • 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>

  • 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