Class GlobalWebhookManager

A manager for interacting with global webhooks. You can retrieve webhooks from the .cache property

Hierarchy

Constructors

Properties

Accessors

Methods

Constructors

Properties

cache: Collection<string, Webhook> = ...
client: Client

Accessors

Methods

  • Delete a webhook

    Parameters

    • serverId: string

      The ID of the server the webhook is in

    • webhookId: string

      The ID of the webhook to delete

    Returns Promise<void>

    A Promise that resolves with no value upon successful deletion

  • Get a webhook

    Parameters

    • serverId: string

      The ID of the server the webhook is in

    • webhookId: string

      The ID of the webhook

    • Optional force: boolean

      Whether to skip the cache check and request the API

    Returns Promise<Webhook>

    A Promise that resolves to the fetched webhook

  • Get a server's webhooks

    Parameters

    • serverId: string

      The ID of the server to get webhooks for

    • channelId: string

      The ID of the channel to get webhooks for

    Returns Promise<Collection<string, Webhook>>

    A Promise that resolves to a Collection of Webhooks

  • Update a webhook

    Parameters

    • serverId: string

      The ID of the server the webhook is in

    • webhookId: string

      The ID of the webhook to update

    • options: {}

      The options for updating the webhook

      Returns Promise<Webhook>

      A Promise that resolves to the updated Webhook

    Generated using TypeDoc