Gateway › Discord

Discord

Overview

The server plays the role of a group, a channel is a topic, and a thread belongs to its parent channel’s topic.

Create the application & bot

  1. Developer Portal → New Application; the application id is <APP_ID>.
  2. Bot → Reset Token to get the bot token.
  3. Enable SERVER MEMBERS INTENT and MESSAGE CONTENT INTENT.

Missing an intent: saving on Integrations names which one; a running bot stops retrying — Monitor → Gateway → View log shows the reason. Enable the intent, then Monitor → Gateway → Restart.

Invite the bot

https://discord.com/oauth2/authorize?client_id=<APP_ID>&scope=bot%20applications.commands&permissions=274878024768
Scope / permissionMeaning
applications.commandsLets the bot register slash commands.
274878024768Exactly 7 permissions: View Channels, Send Messages, Send in Threads, Read Message History, Add Reactions, Attach Files, Embed Links.

Set up credentials

On the web app Integrations page → Gateways → Create on the discord row (Bot token, Owner user id), then Enable. Credentials are stored by agent-hub, not in .env.

Get the id via Settings → Advanced → Developer Mode, then right-click → Copy ID. An owner who already exists on Telegram keeps the same account and gets an added Discord identity.

For a default lane for messages with no resolvable target, open Settings on the Discord row of the Integrations page (Gateways card) and set Fallback target to discord:<guild_id>:<channel_id>.

Usage

Commands start with / — either native slash commands or typed as plain text; see Chat commands.

  • /project add in any channel links the whole server to a project.
  • Slash commands /agent /ask /scope /project /user; global commands can take up to an hour to show up, text commands run instantly.
  • A member who joins later is auto-registered; for an existing member: /user add @name.
  • Server owner = group creator; Administrator role = admin.
  • A private thread is only visible once the bot has been added to that thread.