Skip to main content

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

  1. Go to the Discord Developer Portal
  2. Create a new application and add a bot
  3. Enable the required intents: Server Members, Message Content, Guild Messages, Guild Message Reactions
  4. Copy the bot token

Step 2: Configure TierZero

  1. Go to Settings → Integrations in TierZero
  2. Click Connect next to Discord
  3. Enter your bot token and webhook endpoint URL
  4. Copy the TierZero API key provided

Step 3: Deploy Your Bot

Deploy a bot that:
  1. Listens to Discord events (mentions, reactions, server joins/leaves)
  2. Forwards events to TierZero’s webhook endpoints
  3. Exposes webhook endpoints for TierZero to send messages back

Authentication

All communication between TierZero and your bot uses the header:
x-tierzero-discord-key: <32-char-hex-api-key>

Events

Discord → TierZero

EventTriggerEndpoint
server_joinedBot added to a serverPOST /discord/webhooks/server_joined
bot_mentionedUser mentions the botPOST /discord/webhooks/bot_mentioned
reaction_addedUser reacts to a messagePOST /discord/webhooks/reaction_added
server_leftBot removed from serverPOST /discord/webhooks/server_left

TierZero → Discord

OperationBot Endpoint
Send messagePOST /webhooks/send_message
Add reactionPOST /webhooks/add_reaction
Edit messagePOST /webhooks/edit_message
Delete messagePOST /webhooks/delete_message
Get usersPOST /webhooks/get_users
Get channelsPOST /webhooks/get_server_channels
Get messagesPOST /webhooks/get_channel_messages
Get threadsPOST /webhooks/get_channel_threads
For detailed webhook specifications, payload schemas, and implementation examples, see the full Discord Bot reference.

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-key header matches
  • Ensure the bot has the required Discord intents enabled