Connect a Discord bot
Create a Discord application, grant test-channel access, connect Onevium, and verify message and conversation scope.
ChannelsConnect a Discord bot#
Create a Discord bot, connect it to a Onevium project, and verify two messages in a server channel.
Create the application and token#
- Open the Discord Developer Portal and choose New Application.
- Open Bot, create/reset the Bot Token when needed, and keep it for Onevium's Bot Token field.
- Use a test server and text channel that you can administer. Do not use a personal-user token.
Resetting the token invalidates the previous one; update the Onevium connection and reconnect afterwards.
Set intents and install permissions#
On the Bot page, under Privileged Gateway Intents, enable Message Content Intent. Onevium requests Guilds, GuildMessages, DirectMessages, and MessageContent; it does not need Server Members or Presence for this basic flow. If Discord requires approval for your verified application, complete that approval before connecting. An unapproved requested privileged intent can close the Gateway with code 4014, as explained in the official Gateway documentation.
In OAuth2 → URL Generator, choose the bot scope and these permissions, then open the generated URL to add the bot to your test server:
| Permission | Why it is needed |
|---|---|
| View Channels | Access the intended text channel |
| Send Messages | Send replies |
| Read Message History | Read relevant channel messages |
| Embed Links | Render rich responses |
| Attach Files | Send file outputs |
Check channel-specific overrides as well as the bot's role. You do not need Administrator for this example. Discord documents these controls in its permissions reference.
Create the Onevium connection#
In Onevium, open Channels → New Channel → Single bot → Discord. Paste the Bot Token and complete the token check. This checks bot identity without consuming Gateway messages.
| Field | First-test choice |
|---|---|
| Bot Name | Docs helper |
| Working Directory | The demo project |
| Model | A provider/model already working in Onevium |
| Conversation Mode | Each person gets their own conversation |
| Chat Scope | Groups only |
| Auto-approve Actions | Ask before every action |
| System Prompt | Answer questions about the demo project. Remember the connection-test code in this conversation. |
Save and start the connection. Onevium's Role Description is assistant metadata; it is not a Discord server role and does not grant channel permissions.
Verify messages and scope#
Mention the bot in the test channel with “The test code is gamma-27,” then mention it again and ask for the code. Confirm the answer and matching Onevium conversation.
For DMs, allow them in Chat Scope and explicitly choose the DM policy. An allowlist requires platform user IDs, one per line. For commands supported by your Onevium version, send ordinary text messages; this integration does not register Discord-native slash commands. Test attachments separately after ordinary messages work.
Troubleshoot the connection#
| Symptom | Check |
|---|---|
Invalid channel type during creation | Check the applicable version at the top of this page before changing the token |
Gateway 4014 | Enable/approve Message Content Intent, then restart the connection |
| Bot online but no reply | Mention the bot and check View Channels, Send Messages, channel overrides, and Onevium Chat Scope |
| Token fails after reset | Replace the saved token and reconnect |
| DMs rejected | Check Direct Message Policy and the sender's platform user ID |
Next steps#
Read the channel overview for conversation behavior and permissions for assistant actions. See Feishu for another platform's setup flow.