Skip to content

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:

  1. Relaye formats the message according to your template
  2. The message is sent to Discord via their webhook API
  3. The message appears in the configured Discord channel
  4. 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:

  1. Go to the Outputs section
  2. Click New Output
  3. Select Discord as the output type
  4. Click the Connect to Discord button
  5. You'll be redirected to Discord's authorization page
  6. Select the server where you want to send notifications
  7. Choose the channel within that server
  8. Grant the requested permissions
  9. You'll be redirected back to Relaye
  10. Give your output a name (e.g., "Server Alerts")
  11. Click Save

Manual Webhook Setup

If you prefer to set up the Discord webhook manually:

  1. In Discord, go to the channel you want to use
  2. Open the channel settings
  3. Go to the Integrations tab
  4. Click Create Webhook
  5. Configure the webhook name and avatar
  6. Copy the webhook URL
  7. In Relaye, create a new Discord output
  8. Paste the webhook URL into the Webhook URL field
  9. Give your output a name
  10. 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:

  1. Go to the output's details page
  2. Click Test
  3. Relaye will send a test notification to your Discord channel
  4. 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:

  1. Verify the webhook URL is correct and hasn't been regenerated in Discord
  2. Check if the channel or server still exists
  3. Make sure the webhook hasn't been deleted in Discord
  4. Try creating a new webhook and updating your output

Formatting Problems

If your message formatting isn't displaying correctly:

  1. Check that your Markdown syntax is correct
  2. Ensure code blocks are properly formatted
  3. Verify that URLs in links are properly encoded
  4. Test with simpler formatting first

Viewing Discord Logs

You can view all outgoing Discord notifications by:

  1. Going to the Outputs section
  2. Clicking on your Discord output
  3. 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