Hierarchy

Constructors

Methods

  • Delete a webhook.

    Parameters

    • id: string

      The ID of the webhook.

    • Optional reason: string

      The reason for deleting the webhook.

    Returns Promise<void>

  • Delete a webhook message.

    Parameters

    • id: string

      The ID of the webhook.

    • token: string

      The token of the webhook.

    • messageID: string

      The ID of the message.

    • Optional options: DeleteWebhookMessageOptions

      The options for deleting the message.

    Returns Promise<void>

  • Delete a webhook via its token.

    Parameters

    • id: string

      The ID of the webhook.

    • token: string

      The token of the webhook.

    Returns Promise<void>

  • Execute a github compabible webhook.

    Parameters

    • id: string

      The ID of the webhook.

    • token: string

      The token of the webhook.

    • options: Record<string, unknown> & { wait: false }

      The options to send. See Github's documentation for more information.

    Returns Promise<void>

  • Type Parameters

    Parameters

    • id: string
    • token: string
    • options: Record<string, unknown> & { wait?: true }

    Returns Promise<Message<T>>

  • Execute a slack compabible webhook.

    Parameters

    • id: string

      The ID of the webhook.

    • token: string

      The token of the webhook.

    • options: Record<string, unknown> & { wait: false }

      The options to send. See Slack's Documentation for more information.

    Returns Promise<void>

  • Type Parameters

    Parameters

    • id: string
    • token: string
    • options: Record<string, unknown> & { wait?: true }

    Returns Promise<Message<T>>

  • Get a webhook by ID (and optionally token).

    Parameters

    • id: string

      The ID of the webhook.

    • Optional token: string

      The token of the webhook.

    Returns Promise<Webhook>

  • Get the webhooks in the specified channel.

    Parameters

    • channelID: string

      The ID of the channel to get the webhooks of.

    Returns Promise<RawWebhook[]>

  • Get a webhook message.

    Type Parameters

    Parameters

    • id: string

      The ID of the webhook.

    • token: string

      The token of the webhook.

    • messageID: string

      The ID of the message.

    • Optional threadID: string

      The ID of the thread the message is in.

    Returns Promise<Message<T>>