Skip to main content
GenosOS connects to Discord using discord.js (via @buape/carbon). You need a bot token from the Discord Developer Portal. The agent guides you through every step.

Connect Discord

Tell your assistant you want to connect:
You: "Connect Discord"
The agent opens the Discord setup guide and walks you through the Developer Portal.
1

Create a new application

Go to discord.com/developers/applications and click New Application. Give it a name — this will be your bot’s application name.
2

Create the bot and copy the token

In the left sidebar, click Bot. Click Add Bot to confirm, then click Reset Token and copy the token that appears.
The Bot Token is different from the Application ID and the Public Key. Do not copy the Public Key (it is a hex string) — it will fail authentication. Copy only the token from the Bot page.
3

Enable Message Content Intent

On the same Bot page, scroll down to Privileged Gateway Intents and enable:
  • Message Content Intent — required. Without this, the bot cannot read message content and will crash with error 4014.
  • Server Members Intent — recommended for role-based allowlists and name resolution.
  • Presence Intent — optional.
Save your changes.
4

Generate an invite link and add the bot to your server

Go to Installation → Guild Install. Under Scopes, select bot and applications.commands. Under Permissions, select at minimum Send Messages — recommended additions: View Channels, Read Message History, Embed Links, Attach Files, Add Reactions.Copy the generated install link, open it in your browser, select your server, and click Continue.
5

Enable Developer Mode and copy your user ID

In Discord, go to User Settings → Advanced and enable Developer Mode. Right-click your own avatar and select Copy User ID. You will need this to configure the allowlist.
6

Paste the token to your assistant

You: "Here is my Discord bot token: MTA4NDcw..."
The agent stores it in the encrypted vault, enables the channel, and automatically detects your connected guilds.

Important: Discord IDs are strings

Discord uses 64-bit “Snowflake” integers for all IDs — users, servers, channels, roles. These numbers exceed JavaScript’s safe integer range and must always be stored as strings.
You: "Allow user 123456789012345678 on Discord"
The agent handles this automatically. If you are configuring IDs manually, always quote them:
"users": ["123456789012345678"]
Never store Discord IDs as plain numbers. A numeric ID like 123456789012345678 will be silently corrupted to 123456789012345680 due to floating-point precision loss. The blueprint system enforces string coercion automatically.

DM policy

You: "Only let people I approve DM the bot"
You: "Open the bot to anyone on my server"
PolicyBehavior
pairingUnknown senders get a 6-digit code. You approve via the agent.
allowlistOnly user IDs you specify can interact.
openAccept DMs from anyone.

Guild and channel configuration

By default, the bot responds only when @mentioned in server channels. To change this for a specific server or channel:
You: "Let the bot respond without being mentioned in my server"
You: "Restrict the bot to the #general channel only"
Each Discord channel gets its own isolated session — messages in #general and #support are separate conversations.

Security

Discord is a messaging channel. The agent cannot run shell commands, execute processes, or invoke bash scripts from a Discord conversation — regardless of what the message says. This restriction is architectural. What Discord conversations can do: read files, search memory, send messages, use web tools, query APIs.

Troubleshooting

Error 4014 / Fatal Gateway error Message Content Intent is not enabled. Go to the Developer Portal → your application → Bot → Privileged Gateway Intents → enable Message Content Intent → restart the GenosOS gateway. Error 401 / token verification failed You copied the wrong value. The Public Key (on the General Information page) is a hex string — it is not the bot token. Go to Bot → Reset Token and copy the new token. Bot is connected but does not respond in the server Check the guild configuration. By default, groupPolicy is allowlist and the bot only responds to @mentions. Ask your assistant: “Why isn’t the Discord bot responding in my server?”