Contents

Platforms

Discord

The Discord adapter reads a bot token from an environment variable and responds to mentions or the configured chat trigger.

Minimal configuration

SectionRequired fields
discordtoken_env, guild_id, channels
{
  "discord": {
    "token_env": "DISCORD_BOT_TOKEN",
    "guild_id": "<server-id>",
    "channels": ["<channel-id>"]
  }
}

Create and configure the bot

Create a bot in the Discord Developer Portal, enable Message Content Intent, and provide its token when -setup asks for it. Enter the server (guild) ID and one or more channel IDs. The token is stored in the environment file; discord.token_env names the variable that contains it.

Mentions and triggers

The bot answers when it is mentioned or when a message uses the configured trigger. Keep the token in the environment rather than putting the secret itself in the config.