SlackONOS now supports Discord alongside Slack! You can run both simultaneously or just Discord.
- ✅ All music commands work on Discord
- ✅ Voting system (gong, vote, flush)
- ✅ Shared Sonos queue between Slack and Discord
- ✅ Emoji reactions support
- ✅ Multi-channel support
- Go to https://discord.com/developers/applications
- Click "New Application"
- Give it a name (e.g., "SlackONOS")
- Go to "Bot" section
- Click "Add Bot"
- Under "Privileged Gateway Intents", enable:
- ✅ Message Content Intent
- ✅ Server Members Intent (optional)
- Copy the bot token
- Go to "OAuth2" → "URL Generator"
- Select scopes:
- ✅
bot
- ✅
- Select bot permissions:
- ✅ Send Messages
- ✅ Read Messages/View Channels
- ✅ Read Message History
- ✅ Add Reactions
- Copy the generated URL and open in browser
- Select your server and authorize
- Enable Developer Mode in Discord:
- User Settings → Advanced → Developer Mode
- Right-click on the channel(s) you want the bot to work in
- Click "Copy Channel ID"
Add to your config/config.json:
{
"discordToken": "YOUR_BOT_TOKEN_HERE",
"discordChannels": ["CHANNEL_ID_1", "CHANNEL_ID_2"],
"discordAdminRoles": ["DJ", "Music Admin", "Admin"]
}Admin Permissions:
discordChannels: Channels where bot responds to commandsdiscordAdminRoles: Role names or IDs that can use admin commands (setvolume, flush, etc.)- Users with these roles can use admin commands in ANY allowed channel
- Discord uses role-based permissions (more flexible than Slack's channel-based approach)
npm install # Installs discord.js
node index.jsYou should see:
✅ Slack connection established.
🎮 Discord client connecting...
✅ Discord bot logged in as SlackONOS#1234
All commands work the same as in Slack:
Regular Commands (anyone):
add bohemian rhapsody
bestof queen
gong
vote
list
current
Admin Commands (requires role in discordAdminRoles):
pause
play
setvolume 50
flush
next
remove
You can mention the bot or just use commands directly:
@SlackONOS add everlong
add everlong
- Slack: Uses reactions for interactive votes
- Discord: Uses emoji reactions (coming soon!)
- Shared Queue: Music added from either platform goes to same Sonos queue
- Check bot has "Read Messages" permission in channel
- Verify channel ID is in
discordChannelsarray - Check logs for connection errors
- Ensure bot was invited with correct permissions
- Re-invite bot with updated permission URL
- Enable "Message Content Intent" in Discord Developer Portal
- Bot → Privileged Gateway Intents → Message Content Intent
Simply configure both:
slackAppToken,tokenfor SlackdiscordToken,discordChannelsfor Discord
The bot will connect to both and share the same Sonos queue!
If you only want Discord (no Slack):
- Comment out Slack validation in
index.jsstartup sequence - Or just don't configure Slack tokens (will log warning but continue)
Discord Gateway
↓
discord.js module
↓
processInput() ← Shared command handler
↓
_slackMessage() (auto-detects platform)
↓
Discord Channel / Slack Channel
All business logic (Spotify, Sonos, voting) is shared between platforms!