Various methods for interacting with webhooks.

Hierarchy

  • Webhooks

Constructors

Methods

  • Delete a webhook.

    Parameters

    • webhookID: string

      The ID of the webhook.

    • Optional reason: string

      The reason for deleting the webhook.

    Returns Promise<void>

  • Delete a webhook via its token.

    Parameters

    • webhookID: string

      The ID of the webhook.

    • token: string

      The token of the webhook.

    Returns Promise<void>

  • Execute a GitHub compatible webhook.

    Parameters

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

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

    Returns Promise<Message<T>>

  • Get a webhook message.

    Type Parameters

    Parameters

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