DocsBot IntegrationsDiscord Bot

Discord Bot

Two-way chatDiscord GatewayRequires: Discord Bot Token

The Discord bot opens a persistent Gateway WebSocket connection (no public URL needed). When you @mention the bot in a channel, the message is routed to your agent and the reply is posted back. Conversations are persistent per-channel — threaded back-and-forth keeps full context.

Use cases

  • Community Q&A bot in a Discord server you manage
  • Private personal assistant — DMs only authorized users
  • Game / project channel helper that summarizes activity, manages tasks, and triggers tools
  • Automation entrypoint — use discord.mention_received as a trigger

One-time Discord setup

1. Go to discord.com/developers/applicationsNew Application → name it.

2. In the left sidebar, click BotReset Token and copy the token. Save it for step 6.

3. On the same Bot page, scroll to Privileged Gateway Intents and enable MESSAGE CONTENT INTENT. Without this, the bot can't read messages it's mentioned in.

4. Go to OAuth2 → URL Generator. Under Scopes check bot. Under Bot Permissions check at minimum: View Channels, Send Messages, Read Message History, and (for thread support) Send Messages in Threads + Create Public Threads.

5. Copy the generated URL at the bottom, open it in a new tab, and invite the bot to your server.

Configure in Agent Maker

6. In Agent Maker → Credentials, create a new Discord Bot credential and paste the token from step 2.

7. Open the agent's Settings page → enable the discord tool set → link the credential.

8. Scroll to Discord Bot (Two-Way Chat) → toggle Enable Discord Bot.

9. (Optional) Fill in:

  • Bot Mode Defaults — shared public prompt/model used by Slack and Discord for unauthorized users.
  • Platform Prompt Override — optional Discord-specific prompt. Leave blank to use Bot Mode Defaults.
  • Bot Model — optional Discord-specific model override for unauthorized users (e.g. use a cheaper/faster model for the public).
  • Authorized Discord Usernames — usernames (case-insensitive) that get full agent access with every tool enabled.

10. Save. The agent server picks up the new bot on its next sync (within 60s) and opens the Gateway connection.

How authorization works

On every @mention, the gateway looks up the author's username and checks the Authorized Discord Usernames list. Match → "agent" mode (full system prompt + all tools + memory). No match → "bot" mode (uses the Discord override, otherwise Bot Mode Defaults, otherwise a safe public-chat default; no tools are available).

Events emitted

EventWhen
discord.mention_receivedBot was @mentioned in a channel
discord.message_sentBot posted a reply