Discord Integration
What you’ll learn
- How to create a Discord application and bot account
- How to invite the bot to your server
- How to configure NabaOS to connect to Discord
- What Discord can and cannot do (outbound-only)
Prerequisites
- NabaOS installed (
nabaos --version) - A Discord account with “Manage Server” permission on the target server
- An LLM provider configured (
NABA_LLM_API_KEY)
Important: Outbound-Only
The NabaOS Discord integration is outbound-only. It can send messages to Discord channels but does not support:
- Slash commands
- Inbound message handling (reading DMs or channel messages)
- Interactive features (buttons, reactions)
Discord is used as a notification delivery channel. If you need full interactive bot capabilities, use the Telegram channel or the Web Dashboard.
Step 1: Create a Discord application
- Go to the Discord Developer Portal.
- Click New Application.
- Name your application (e.g.,
NabaOS Agent) and click Create.
Step 2: Create a bot account
- In the Developer Portal, select your application.
- Go to the Bot section in the left sidebar.
- Click Add Bot, then confirm with Yes, do it!
- Under the bot’s username, click Reset Token to generate a new token.
- Copy the bot token.
Keep this token secret.
Step 3: Invite the bot to your server
- Go to the OAuth2 section, then URL Generator.
- Under Scopes, select:
bot
- Under Bot Permissions, select:
- Send Messages
- Embed Links
- Copy the generated URL and open it in your browser.
- Select the server to add the bot to and click Authorize.
Step 4: Configure environment variables
export NABA_DISCORD_BOT_TOKEN="MTIzNDU2Nzg5MDEy.GAbcDE.a1b2c3d4e5f6..."
Step 5: Start the server
The Discord channel is activated when the server detects NABA_DISCORD_BOT_TOKEN in the environment:
nabaos start
Expected output:
[start] Starting Telegram bot...
[start] Starting Discord bot...
[start] Discord bot connected
[start] Ready.
Using Discord as a notification channel
Discord is used via the channel.send ability in chains:
steps:
- id: send_to_discord
ability: channel.send
args:
channel: "discord"
message: "Daily report: {{report}}"
This sends a message to the configured Discord channel via the serenity HTTP client.
Environment variable reference
| Variable | Required | Description |
|---|---|---|
NABA_DISCORD_BOT_TOKEN | Yes | Discord bot token from Developer Portal |
Next steps
- Telegram Setup – Set up the Telegram channel with full interactive support and 2FA
- Web Dashboard – Monitor your agent from a browser
- Constitution Customization – Control what the bot can do