> Source: Onevium official documentation
> Article: Connect a Discord bot (preview creation flow)
> Original URL: https://onevium.com/docs/channels/discord
> Language: English
> Updated: 2026-09-09
> Applies to: 1.1.23-beta.7
> Feature status: Development preview

---

# Connect a Discord bot (preview creation flow)

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

## Connect a Discord bot

This page separates Discord's platform setup from Onevium's creation UI. **The Token-validation creation flow below is available in the 1.1.23-beta.7 preview.** Version 1.1.22 already has a Discord adapter, but its new-channel registration endpoint rejects Discord with `Invalid channel type`; do not treat that as a bad token.

Existing 1.1.22 connections can use the platform checks below. For a new connection, use a preview environment intentionally or wait for a stable build containing the creation fix.

## Create the application and token

1. Open the [Discord Developer Portal](https://discord.com/developers/applications) 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](https://docs.discord.com/developers/events/gateway).

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](https://docs.discord.com/developers/topics/permissions).

## Create the Onevium preview connection

In the supported preview, 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 registration on 1.1.22 | The known creation-UI limitation; the preview adds Discord token validation                       |
| 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](https://onevium.com/docs/team-channels) for conversation behavior and [permissions](https://onevium.com/docs/permissions) for assistant actions. Use [Feishu](https://onevium.com/docs/channels/feishu) if you need the documented stable-version creation flow on another platform.
