Discord Output¶
The Discord output allows you to send notifications to Discord channels via webhooks. It's perfect for community-oriented notifications or gaming-related alerts.
How It Works¶
When you create a Discord output, Relaye uses Discord's webhook system to send messages to your server. When a notification is sent:
- Relaye formats the message according to your template
- The message is sent to Discord via their webhook API
- The message appears in the configured Discord channel
- Relaye logs the delivery status
Discord supports rich formatting, embeds, code blocks, and file attachments, making it a versatile option for detailed notifications.
Setting Up Discord Output¶
To set up a Discord output:
- Go to the Outputs section
- Click New Output
- Select Discord as the output type
- Click the Connect to Discord button
- You'll be redirected to Discord's authorization page
- Select the server where you want to send notifications
- Choose the channel within that server
- Grant the requested permissions
- You'll be redirected back to Relaye
- Give your output a name (e.g., "Server Alerts")
- Click Save
Manual Webhook Setup¶
If you prefer to set up the Discord webhook manually:
- In Discord, go to the channel you want to use
- Open the channel settings
- Go to the Integrations tab
- Click Create Webhook
- Configure the webhook name and avatar
- Copy the webhook URL
- In Relaye, create a new Discord output
- Paste the webhook URL into the Webhook URL field
- Give your output a name
- Click Save
Handling Images and Files¶
Discord can display images and files sent with notifications. If your input includes images or files, they will be automatically forwarded to Discord where supported.
Testing Your Discord Output¶
To test your Discord output:
- Go to the output's details page
- Click Test
- Relaye will send a test notification to your Discord channel
- Check your Discord channel to confirm receipt
Common Uses¶
Discord outputs are frequently used for:
- Server Status Updates: Notify about server uptime, performance, or issues
- Community Announcements: Send updates to community members
- Gaming Events: Notify about game events, tournaments, or server restarts
- Developer Updates: Share code commits, build statuses, or deployment information
- Monitoring Alerts: Forward monitoring system alerts to team channels
Troubleshooting¶
Common Issues¶
Webhook URL Issues
If your webhook isn't working:
- Verify the webhook URL is correct and hasn't been regenerated in Discord
- Check if the channel or server still exists
- Make sure the webhook hasn't been deleted in Discord
- Try creating a new webhook and updating your output
Formatting Problems
If your message formatting isn't displaying correctly:
- Check that your Markdown syntax is correct
- Ensure code blocks are properly formatted
- Verify that URLs in links are properly encoded
- Test with simpler formatting first
Viewing Discord Logs¶
You can view all outgoing Discord notifications by:
- Going to the Outputs section
- Clicking on your Discord output
- Navigating to the Outgoing Logs tab
This will show you all sent notifications, their status, and any error messages.
Best Practices¶
- Use descriptive webhook names in Discord to identify the source
- Create dedicated channels for different types of notifications
- Use formatting to make important information stand out
- Include relevant context in your notifications
- Use mentions sparingly and only when necessary
- Consider the activity level of your Discord server when setting up notifications
- Use embeds for more structured information (where supported)
- Include timestamps in your notifications for reference