Options
All
  • Public
  • Public/Protected
  • All
Menu

Webhook resource

Hierarchy

  • WebhooksResource

Index

Constructors

constructor

Methods

create

  • create(channelId: string, data: RESTPostAPIChannelWebhookJSONBody): Promise<APIWebhook>
  • Creates a new webhook on the channel

    Parameters

    • channelId: string

      ID of channel

    • data: RESTPostAPIChannelWebhookJSONBody

      Data for new webhook

    Returns Promise<APIWebhook>

delete

  • delete(webhookId: string, token?: string): Promise<never>
  • Deletes a webhook

    Parameters

    • webhookId: string

      ID of webhook

    • Optional token: string

      Token (if none provided, uses bot permission)

    Returns Promise<never>

deleteMessage

  • deleteMessage(webhookId: string, token: string, messageId: string): Promise<null>
  • Deletes a message sent by a webhook with it's token

    Parameters

    • webhookId: string

      ID of Webhook

    • token: string

      Token of Webhook

    • messageId: string

      ID of message

    Returns Promise<null>

editMessage

  • editMessage(webhookId: string, token: string, messageId: string, data: MessageTypes): Promise<APIMessage>
  • Edits a message sent by a webhook with it's token

    Parameters

    • webhookId: string

      ID of Webhook

    • token: string

      Token of Webhook

    • messageId: string

      ID of message

    • data: MessageTypes

      Message data to replace

    Returns Promise<APIMessage>

    New message

get

  • get(webhookId: string, token: string): Promise<APIWebhook>

send

  • send(webhookId: string, token: string, data: MessageTypes): Promise<APIMessage>

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Static method

Generated using TypeDoc