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:
- In Discord, go to the server where you want to receive notifications.
- Click on the channel settings dropdown menu.
- In the Server Settings, select Integrations from the left sidebar.
- Under "Webhooks," click Create Webhook. If no webhooks exist, you’ll see a "You have no webhooks!" message with this option.
- 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.
- Click Copy Webhook URL to copy the URL for use in Telebugs.
Completing the webhook configuration in Telebugs ¶
Navigate back to Telebugs to complete the webhook configuration:
- In Telebugs, go to Notification Configuration and select Webhooks.
- Click Create Configuration and choose Slack as the template type.
- The template body will auto-fill with a Discord-compatible payload, which you can customize if needed.
- Paste the webhook URL from Discord into the Webhook URL field and optionally provide a name (e.g., "#telebugs").
- Click Save webhook to save the configuration.
- To test, click the Test button next to it. This sends a test notification to your Discord channel.
- When an error occurs, Telebugs sends a notification to the specified Discord channel using the configured webhook URL.
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.