8.3.2 Configuring Discord notifications

Discord webhooks allow Telebugs to send error notifications directly to a Discord channel. This integration provides real-time alerts, enabling teams to monitor and respond to errors efficiently.

Obtain a webhook URL from Discord

To configure a Discord webhook, follow these steps:

  1. In Discord, go to the server where you want to receive notifications.
  2. Click on the channel settings dropdown menu. Discord channel settings link
  3. In the Server Settings, select Integrations from the left sidebar. Discord integrations menu
  4. Under "Webhooks," click Create Webhook. If no webhooks exist, you’ll see a "You have no webhooks!" message with this option. Create Webhook button
  5. Configure the webhook: give it a name (e.g., "Telebugs"), select the channel where notifications will post (e.g., "#telebugs"), and optionally set an avatar. Configure webhook settings
  6. Click Copy Webhook URL to copy the URL for use in Telebugs. Copy Webhook URL button

Completing the webhook configuration in Telebugs

Navigate back to Telebugs to complete the webhook configuration:

  1. In Telebugs, go to Notification Configuration and select Webhooks.
  2. Click Create Configuration and choose Slack as the template type. Select Discord template type
  3. The template body will auto-fill with a Discord-compatible payload, which you can customize if needed.
  4. Paste the webhook URL from Discord into the Webhook URL field and optionally provide a name (e.g., "#telebugs").
  5. Click Save webhook to save the configuration.
  6. To test, click the Test button next to it. This sends a test notification to your Discord channel.
  7. When an error occurs, Telebugs sends a notification to the specified Discord channel using the configured webhook URL. Telebugs Discord notification example

Discord-compatible payload

Here’s an example of a Discord-compatible payload:

{
  "content": "**{{trigger}}** from [{{project_name}}]({{project_url}})\n[View error]({{view_url}})",
  "embeds": [
    {
      "color": 16711680,
      "fields": [
        {
          "name": "{{error_type}}{{culprit}}",
          "value": "{{error_message}}"
        },
        {
          "name": "Location",
          "value": "{{location}}"
        }
      ]
    }
  ]
}

You can customize the payload however you like, using the available keys to include dynamic values from the error report (see Webhook template body placeholders). For example, you can change the color, add more fields, or modify the message format.