Skip to content
OneviumDocs
On this page

Connect a Discord bot

Create a Discord application, grant test-channel access, connect Onevium, and verify message and conversation scope.

Connect 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#

  1. Open the Discord Developer Portal and choose New Application.
  2. Open Bot, create/reset the Bot Token when needed, and keep it for Onevium's Bot Token field.
  3. 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:

PermissionWhy it is needed
View ChannelsAccess the intended text channel
Send MessagesSend replies
Read Message HistoryRead relevant channel messages
Embed LinksRender rich responses
Attach FilesSend 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.

FieldFirst-test choice
Bot NameDocs helper
Working DirectoryThe demo project
ModelA provider/model already working in Onevium
Conversation ModeEach person gets their own conversation
Chat ScopeGroups only
Auto-approve ActionsAsk before every action
System PromptAnswer 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#

SymptomCheck
Invalid channel type during creationCheck the applicable version at the top of this page before changing the token
Gateway 4014Enable/approve Message Content Intent, then restart the connection
Bot online but no replyMention the bot and check View Channels, Send Messages, channel overrides, and Onevium Chat Scope
Token fails after resetReplace the saved token and reconnect
DMs rejectedCheck 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.