Channels
Manage messaging channel connections for Telegram and Discord.
Overview
Channels allow agents to interact with users through messaging platforms. Moxxy supports two channels:
moxxy channel <type> --agent <name>| Channel | Status | Description |
|---|---|---|
| Telegram | Stable | Full bot support with voice messages |
| Discord | Stable | Bot integration with Message Content Intent |
Telegram Setup
Prerequisites
- Create a bot via @BotFather on Telegram
- Save the bot token you receive
Connect Command
moxxy channel telegram --agent <name>Step-by-Step
Start the setup:
bashmoxxy channel telegram --agent defaultEnter your bot token:
? Enter your bot token (from @BotFather): 123456789:ABCdefGHIjklMNOpqrsTUVwxyzStart your bot on Telegram:
- Open Telegram
- Find your bot
- Send
/start
Enter the pairing code: The bot responds with a 6-digit pairing code. Enter it in the CLI:
? Pairing code: 123456Done. Your agent is now connected to Telegram.
Voice Messages
Voice messages sent to the bot are automatically supported. The gateway processes voice input and provides it to the agent.
Full Example
$ moxxy channel telegram --agent default
Setting up Telegram channel...
? Enter your bot token (from @BotFather): 123456:ABC***
Bot configured!
Now send /start to your bot on Telegram.
Then enter the 6-digit pairing code you receive.
? Pairing code: 123456
Telegram channel connected!Discord Setup
Prerequisites
- Create a Discord application at Discord Developer Portal
- Create a bot user under the application
- Generate a bot token
- Enable Message Content Intent under Privileged Gateway Intents (required)
- Invite the bot to your server with the Bot scope and Send Messages permission
Connect Command
moxxy channel discord --agent <name>Step-by-Step
Start the setup:
bashmoxxy channel discord --agent defaultEnter your bot token:
? Discord bot token: **********Restart the gateway to activate the bridge:
bashmoxxy gateway restartSend a message in any Discord channel the bot has access to.
Full Example
$ moxxy channel discord --agent default
Channel Setup: Discord
To get a Discord bot token:
1. Go to https://discord.com/developers/applications
2. Create a New Application, go to Bot section
3. Click 'Reset Token' to get a bot token
4. Enable 'Message Content Intent' under Privileged Gateway Intents
5. Invite the bot to your server with the Bot scope + Send Messages permission
? Discord bot token: **********
Discord bot token saved for agent 'default'.
Next steps:
1. Make sure the bot is invited to your Discord server
2. Restart the moxxy gateway: moxxy gateway restart
3. Send a message in any channel the bot has access toChannel Management via API
Channels can also be managed through the REST API:
Create a Channel
curl -X POST http://127.0.0.1:3000/v1/channels \
-H "Authorization: Bearer mox_your_token" \
-H "Content-Type: application/json" \
-d '{
"type": "telegram",
"agent_name": "default",
"config": {
"bot_token": "123456789:ABCdefGHIjklMNOpqrsTUVwxyz"
}
}'Pair a Channel
curl -X POST http://127.0.0.1:3000/v1/channels/pair \
-H "Authorization: Bearer mox_your_token" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "chan_abc123",
"pair_code": "123456"
}'Delete a Channel
curl -X DELETE http://127.0.0.1:3000/v1/channels/chan_abc123 \
-H "Authorization: Bearer mox_your_token"Multiple Agents, Multiple Channels
Each agent can have its own channel connections:
# Agent 1 on Telegram
moxxy channel telegram --agent assistant
# Agent 2 on Discord
moxxy channel discord --agent researcherTroubleshooting
Bot Not Responding
Check gateway status:
bashmoxxy gateway statusVerify the gateway is running and the channel bridge loaded at startup (check logs).
Restart the gateway to reload channel bridges:
bashmoxxy gateway restart
Telegram Pairing Failed
- Ensure you sent
/startto the bot before entering the pairing code - Pairing codes expire after a short window; try again if it timed out
- Verify the bot token is correct
Discord Bot Not Responding
- Ensure Message Content Intent is enabled in the Discord Developer Portal
- Verify the bot has been invited to the server with appropriate permissions
- Check that the bot token is valid and has not been regenerated since setup