fetchWebhook

async fetchWebhook(webhookId: string, token: string) Promise<Webhook | null>

Fetches a webhook by ID. A webhook token may be required for webhooks the bot cannot access normally. Returns null when Discord reports that the webhook does not exist.

Parameters:
  • webhookId — – The webhook ID to fetch.

  • token — – The webhook token, when required.