Overview
Connect Discord to enable TierZero to receive alerts, interact with your team, and manage incidents directly in Discord channels. The Discord integration works through a bot that bridges Discord and TierZero via webhooks.Prerequisites
- A Discord Developer Application and Bot Token
- An HTTPS endpoint for webhook reception
- A TierZero API key (32-character hex string)
How It Works
The Discord bot acts as a bridge between Discord and TierZero:- Outbound (Discord → TierZero): Bot forwards mentions, reactions, and server events to TierZero via webhooks
- Inbound (TierZero → Discord): TierZero sends messages, reactions, and updates back through the bot
Setup Instructions
Step 1: Create a Discord Bot
- Go to the Discord Developer Portal
- Create a new application and add a bot
- Enable the required intents: Server Members, Message Content, Guild Messages, Guild Message Reactions
- Copy the bot token
Step 2: Configure TierZero
- Go to Settings → Integrations in TierZero
- Click Connect next to Discord
- Enter your bot token and webhook endpoint URL
- Copy the TierZero API key provided
Step 3: Deploy Your Bot
Deploy a bot that:- Listens to Discord events (mentions, reactions, server joins/leaves)
- Forwards events to TierZero’s webhook endpoints
- Exposes webhook endpoints for TierZero to send messages back
Authentication
All communication between TierZero and your bot uses the header:Events
Discord → TierZero
| Event | Trigger | Endpoint |
|---|---|---|
server_joined | Bot added to a server | POST /discord/webhooks/server_joined |
bot_mentioned | User mentions the bot | POST /discord/webhooks/bot_mentioned |
reaction_added | User reacts to a message | POST /discord/webhooks/reaction_added |
server_left | Bot removed from server | POST /discord/webhooks/server_left |
TierZero → Discord
| Operation | Bot Endpoint |
|---|---|
| Send message | POST /webhooks/send_message |
| Add reaction | POST /webhooks/add_reaction |
| Edit message | POST /webhooks/edit_message |
| Delete message | POST /webhooks/delete_message |
| Get users | POST /webhooks/get_users |
| Get channels | POST /webhooks/get_server_channels |
| Get messages | POST /webhooks/get_channel_messages |
| Get threads | POST /webhooks/get_channel_threads |
Security
- HTTPS 1.2+ required for all communications
- Replay protection: Each event includes a UUID idempotency key; duplicates are rejected within 24 hours
- Store your API key securely and never expose it in client-side code
Troubleshooting
Bot Not Responding
- Verify the bot is online and the webhook endpoint is reachable
- Check that the
x-tierzero-discord-keyheader matches - Ensure the bot has the required Discord intents enabled