Skip to content

Stream radio stations directly into Discord voice channels. Powered by the Radio Browser API with slash commands, audio streaming, genre & country filters, and more.✨

License

Notifications You must be signed in to change notification settings

DasCanard/radioss-discord

Repository files navigation

📻 Radioss Discord Bot

A Discord bot for radio stations that uses the Radio Browser API and provides audio streaming directly to Discord voice channels. The bot is operated via slash commands and offers an intuitive search for radio stations.

Hosted by me: (24/7 HQ): Invite👋

✨ Features

  • 🔍 Search for Radio Stations by name, country, or genre
  • 🏆 Top Radio Stations sorted by popularity
  • 🌍 Country-specific Search for regional stations
  • 🎵 Genre-based Search (Rock, Pop, Jazz, News, etc.)
  • 🎲 Random Radio Stations for discovery
  • 🎧 Audio Streaming directly to Discord voice channels
  • 💎 Interactive Buttons for easy operation
  • 🎯 Intuitive Slash Commands
  • 🔊 Volume Control with dropdown menu
  • 📱 Pagination for search results
  • Favorites System for personal station lists
  • 🔄 Reconnection Logic on crash or update
  • 🕐 24/7 Mode for continuous operation

🚀 Setup

1. Create Discord Bot

  1. Go to Discord Developer Portal
  2. Create a new Application
  3. Go to "Bot" and create a bot
  4. Copy the bot token
  5. Go to "OAuth2" → "URL Generator"
    • Scopes: bot, applications.commands
    • Bot Permissions: Send Messages, Use Slash Commands, Embed Links, Connect, Speak
  6. Invite the bot to your server with the generated URL

2. Start Bot

Option 1: Docker (Recommended)

# Create environment file
echo "DISCORD_BOT_TOKEN=your_bot_token_here" > .env

# Run with Docker Compose
docker-compose up -d

# View logs
docker-compose logs -f radioss-bot

Option 2: With Environment Variable

export DISCORD_BOT_TOKEN="your_bot_token_here"
./gradlew run

Option 3: Build and Run JAR

./gradlew shadowJar
java -jar build/libs/radioss-discord-0.1.0-all.jar

🎮 Commands

Use /help in Discord to view all available commands and their usage.

🐳 Docker Deployment

Development

# Build and run locally
docker-compose up --build

# Stop the bot
docker-compose down

Production

# Update to latest version
docker-compose pull
docker-compose up -d

Environment Variables

Create a .env file:

DISCORD_BOT_TOKEN=your_discord_bot_token_here
UPTIME_HEARTBEAT_URL=https://uptime.betterstack.com/api/v1/heartbeat/your_heartbeat_id

Optional:

  • UPTIME_HEARTBEAT_URL: URL for uptime monitoring (e.g. Better Stack). The bot sends a heartbeat every 60 seconds. If not set, the feature is disabled.

🛠️ Technical Details

  • Language: Kotlin
  • Discord Library: JDA 5.1.0
  • Audio Library: LavaPlayer 1.3.78
  • HTTP Client: OkHttp 4.12.0
  • API: Radio Browser API (Selfhosted)
  • Build Tool: Gradle
  • Java Version: 21

🔧 Development

Install Dependencies

./gradlew build

Run Tests

./gradlew test

Build JAR with all Dependencies

./gradlew shadowJar

Docker Development

# Build image locally
docker build -t radioss-discord .

# Run with local image
docker run -e DISCORD_BOT_TOKEN=your_token radioss-discord

🌟 Upcoming Features

Planned enhancements:

  • Favorites System for personal station lists
  • 🔍 Station Search directly in /play command
  • 📊 Advanced Statistics about radio stations

📄 License

This project is released under the MIT License.

🙏 Credits

About

Stream radio stations directly into Discord voice channels. Powered by the Radio Browser API with slash commands, audio streaming, genre & country filters, and more.✨

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 2

  •  
  •