Overview
You can access Onyx Cloud or your self-hosted instance through a Discord bot.Configuration
Official OnyxBot
You’ll need to be an admin of the Discord server and an admin in your Onyx instance to install and configure OnyxBot.Install OnyxBot in your Discord server

Allow access to a private text channel

Create a registration key in Onyx
Register your Server in Onyx
!register <your-key>.
You need the Administrator or Manage Server permission in the Discord server.
One Discord server can connect to only one Onyx workspace.OnyxBot responds with a message that confirms the server is registered.

Configure Channel behavior
- Default Agent: the Agent that powers the bot’s responses in all channels
- Agent Override for specific channels
- Enabled: which channels the bot answers in
- Require @mention: respond to all messages, or only to messages that tag @OnyxBot
- Thread Only Mode: answer in a new thread instead of a reply

Self-hosted Discord Bot
Create a new Discord app

Configure permissions and installation settings

Enable Privileged Gateway Intents

Install the app in your Discord server
Allow your app to access a private text channel

Retrieve your bot token

Configure your app in Onyx

Create a registration key in Onyx
Register your Server in Onyx
!register <your-key>.
You need the Administrator or Manage Server permission in the Discord server.Your Onyx bot responds with a message that confirms the server is registered.

Configure Channel behavior
- Default Agent: the Agent that powers the bot’s responses in all channels
- Agent Override for specific channels
- Enabled: which channels the bot answers in
- Require @mention: respond to all messages, or only to messages that tag @OnyxBot
- Thread Only Mode: answer in a new thread instead of a reply

Using the Bot
In an enabled channel, users ask a question by tagging @OnyxBot, or by posting a message when Require @mention is off. The bot also answers replies to its messages and messages in threads it created. The bot does not answer direct messages.FAQ
Why can’t I see all of my channels in Onyx?
If you’ve added or removed channels from your Discord server, you’ll need to sync the channels to Onyx. Run!sync-channels in any text channel that OnyxBot has access to.
! is already taken by another command!
!register and !sync-channels are the only commands OnyxBot supports.
If you are self-hosting, you can set the DISCORD_BOT_INVOKE_CHAR environment variable to change the command prefix.
If you are using the official OnyxBot, the prefix cannot be changed.
You may still be able to run the command by creating a private channel that only OnyxBot has access to.
My Discord bot is connected but not responding to any messages
If you are seeing this behavior, you could be experiencing the following error (in background container):git pull in your Onyx repo.
Verify that API_SERVER_PROTOCOL and API_SERVER_HOST exists in your compose file.