A personal MVP project for broadcasting audio from one Discord voice channel to multiple listener channels simultaneously.
Perfect for presentations, meetings, events, and any scenario where you need to broadcast audio to multiple groups at once.
The system uses multiple Discord bots working together:
Speaker Channel → AudioForwarder Bot → WebSocket Relay → AudioReceiver Bots → Listener Channels
(Presenter) (Captures audio) (Routes audio) (Play audio) (Audiences)
- AudioBroadcast Bot: Main control bot that handles commands and coordination
- AudioForwarder Bot: Joins the speaker channel and captures audio
- AudioReceiver Bots: Join listener channels and play the audio (one bot per channel)
- WebSocket Relay: Routes audio between the forwarder and receiver bots
Create bots in the Discord Developer Portal:
| Bot | Display Name | Purpose |
|---|---|---|
| AudioBroadcast | AudioBroadcast | Main control bot (handles commands) |
| AudioForwarder | Fwd-Speaker | Captures audio from speaker channel |
| AudioReceiver-1 | Rcv-1 | Plays audio to listener channel 1 |
| AudioReceiver-2 | Rcv-2 | Plays audio to listener channel 2 |
| ... | ... | ... |
| AudioReceiver-N | Rcv-N | Additional listener channels as needed |
Important Naming Requirements:
- AudioForwarder bot must have "forward" in its display name (e.g.,
Fwd-Speaker,AudioForwarder) - AudioReceiver bots must have names starting with
Rcv-(e.g.,Rcv-1,Rcv-2,Rcv-3) - The system auto-detects bots by these naming patterns
For the AudioBroadcast bot only (main control bot), go to the Discord Developer Portal → Bot section → Enable:
- ✅ Server Members Intent (required for bot detection)
- ✅ Message Content Intent (required for prefix commands)
Note: AudioForwarder and AudioReceiver bots do NOT need privileged intents enabled.
Give each bot these permissions (or use Administrator for simplicity):
- Connect, Speak (Voice)
- Manage Channels, Manage Roles
- Send Messages, Read Message History, Embed Links
Permission Integer for AudioReceiver bots: 3145728
Generate OAuth2 URLs and invite all bots:
- Go to Discord Developer Portal → OAuth2 → URL Generator
- Select scopes:
bot - Select permissions or use Administrator
- Copy URL and open in browser to invite
Quick invite URL format:
https://discord.com/oauth2/authorize?client_id=YOUR_BOT_CLIENT_ID&permissions=3145728&integration_type=0&scope=bot
Replace YOUR_BOT_CLIENT_ID with each bot's client ID from the Developer Portal.
# Clone repository
git clone <repository-url>
cd discord-audio-router
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp env.example .env
# Edit .env and paste your bot tokensImportant: Edit .env and add all bot tokens from the Discord Developer Portal.
The system can show invite links to users who need to add more receiver bots:
# Edit data/bot_urls.json with your bot invite URLs
# Format: JSON array of invite URLs, one per receiver botExample data/bot_urls.json:
[
"https://discord.com/oauth2/authorize?client_id=BOT1_ID&permissions=3145728&integration_type=0&scope=bot",
"https://discord.com/oauth2/authorize?client_id=BOT2_ID&permissions=3145728&integration_type=0&scope=bot"
]You can also use the management script:
python manage_urls.py list # List all URLs
python manage_urls.py add <invite_url> # Add a new URL
python manage_urls.py remove <index> # Remove URL by indexpython launcher.pyThe launcher will start:
- WebSocket relay server
- AudioBroadcast bot
- All system components
In Discord, use these commands:
!help # View all commands
!bot_status # Check system health and bot detection
!control_panel # Open interactive control panelUsing the Control Panel:
- Click "Create Broadcast"
- Enter number of listener channels (based on your subscription tier)
- Optionally enter a custom role name for speaker access
- Wait for channels to be created
- Join the Speaker channel and start talking
- Audience joins Channel-1, Channel-2, etc. to listen
| Command | Description |
|---|---|
!control_panel |
Open interactive control panel (admin only) |
!help |
Show help and usage information |
!bot_status |
Check system health and bot detection |
!subscription_status |
View your server's subscription tier and limits |
!how_it_works |
Learn how the audio router works |
The system uses a SQLite database (data/subscriptions.db) to manage per-server licenses that control how many listener channels each server can create.
| Tier | Max Listeners | Use Case |
|---|---|---|
| Free | 1 | Testing, basic use |
| Basic | 2 | Small groups |
| Standard | 6 | Small communities |
| Advanced | 12 | Medium communities |
| Premium | 24 | Large communities |
| Custom | Unlimited | Enterprise |
Use the manage_subscriptions.py CLI tool:
# Create subscription using Discord invite code
python manage_subscriptions.py create <invite_code> <tier>
# Example: Create a premium subscription
python manage_subscriptions.py create abc123xyz premium
# List all subscriptions
python manage_subscriptions.py list
# Update tier
python manage_subscriptions.py update <invite_code> <new_tier>
# Delete subscription
python manage_subscriptions.py delete <invite_code>
# View available tiers
python manage_subscriptions.py tiersGetting an invite code:
- In Discord, right-click any channel → "Invite People"
- Click "Edit invite link" → Set "Expire After" to "Never"
- Copy invite code (e.g.,
https://discord.gg/abc123xyz→ useabc123xyz)
Note: Servers without a subscription default to the Free tier (1 listener).
# Main control bot
AUDIO_BROADCAST_TOKEN=your_audiobroadcast_bot_token
# Speaker bot
AUDIO_FORWARDER_TOKEN=your_audioforwarder_bot_token
# Listener bots (one per line)
AUDIO_RECEIVER_TOKENS=[
your_audioreceiver_1_token,
your_audioreceiver_2_token,
your_audioreceiver_3_token
]BOT_PREFIX=! # Command prefix (default: !)
AUTO_CLEANUP_TIMEOUT=10 # Auto-cleanup inactive broadcasts in minutes (0 to disable)
ENVIRONMENT=development # Logging level: development, staging, productionSolution: Enable Server Members Intent and Message Content Intent in Discord Developer Portal for the AudioBroadcast bot (main control bot only).
Solution: Create more AudioReceiver bots and add their tokens to AUDIO_RECEIVER_TOKENS in .env.
Solution:
- Verify the AudioForwarder bot has "forward" in its display name
- Ensure the bot has Connect and Speak permissions
- Check that the voice channel doesn't have restrictions blocking the bot
Solution:
- Verify FFmpeg is installed on your system
- Check that all bots are connected to voice channels (
!bot_status) - Ensure speaker channel has active speakers
- Check logs in the
logs/directory
Solution:
- Verify all AudioReceiver bots have names starting with
Rcv- - Check that Server Members Intent is enabled for AudioBroadcast bot
- Ensure all bots are in the same Discord server
Minimum:
- RAM: 2GB
- CPU: 2 cores
- Storage: 1GB
- Python 3.8+
- FFmpeg
Recommended for Production:
- RAM: 4GB+ (add 1GB per 5 listener channels)
- CPU: 4+ cores
- Storage: 5GB+
- Stable, high-speed internet connection
discord-audio-router/
├── launcher.py # Main launcher script
├── manage_subscriptions.py # Subscription management CLI
├── manage_urls.py # Bot URL management CLI
├── .env # Configuration (create from env.example)
├── data/
│ ├── subscriptions.db # SQLite subscription database
│ ├── bot_urls.json # Bot invite URLs for users
│ └── control_panel_panels.json # Control panel state
├── logs/ # Application logs
└── src/
└── discord_audio_router/ # Main application code
Copyright (c) 2024-2025 - All Rights Reserved
This project is for personal, educational, and non-commercial use only.
- Use for personal, non-commercial purposes
- Study and learn from the code
- Modify for personal use
- Run on your own Discord servers
- Sell, license, or commercialize this software
- Offer as a paid service
- Redistribute for commercial purposes
- Remove copyright notices
This software must comply with:
For commercial use or licensing inquiries, contact the owner for written permission.
THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. THE AUTHOR IS NOT RESPONSIBLE FOR ANY DAMAGES ARISING FROM USE. USERS ARE SOLELY RESPONSIBLE FOR COMPLIANCE WITH ALL LAWS AND DISCORD POLICIES.
- Create all Discord bots in Developer Portal
- Enable Server Members Intent and Message Content Intent for AudioBroadcast bot only
- Set correct display names (Fwd-Speaker, Rcv-1, Rcv-2, etc.)
- Invite all bots to your Discord server
- Copy
env.exampleto.envand add bot tokens - (Optional) Configure
data/bot_urls.jsonwith invite links - Run
python launcher.py - Use
!control_panelin Discord to create your first broadcast
Happy Broadcasting! 🎵
A personal MVP project demonstrating multi-channel audio broadcasting in Discord.