A feature-rich Discord bot for streaming radio stations with automatic recovery and management features.
- Multiple Radio Station Support: Manage and play multiple radio stations
- Automatic Stream Recovery: Auto-fixes stream issues every 6 hours
- Real-time Status Updates: Shows currently playing track with Spotify cover art
- Voice Channel Management: Automatically moves to default channel when alone
- Station Management: Easy to add, remove, and list radio stations
- Volume Control: Adjustable volume for each stream
- Detailed Logging: Comprehensive logging system for troubleshooting
- Admin Controls: Secure command access with role-based permissions
- Banlist for Push Messages:
You can now define forbidden titles in yourconfig.ini
under[push]
with thebanned_titles
key.
Any track title containing one of these (case-insensitive, supports substrings/wildcards) will not be pushed as "Now Playing". - Example in
config.ini
:[push] banned_titles = ANTENNE NRW,Radio XY,Werbung,Unknown,Live-Stream
- The bot checks for these substrings before posting any now playing notification.
- The banlist is automatically loaded with all other config options on startup.
- No need for manual reloading or code changes when updating the banlist; just edit your
config.ini
and restart the bot.
- The
!play
command now provides a rich embed:- Shows the current track title and station in a visually appealing card.
- Displays a cover image if available.
- Shows who requested the track.
- Error and info messages are now sent as colored embeds for clarity.
- Removed outdated tasks and legacy update logic.
- The new
monitor_track
task handles push updates, using the banlist and providing improved error handling and logging.
-
Automatic Stream Recovery:
The bot now automatically triggers!fix
every 6 hours to recover from possible stream issues. -
Enhanced Logging System:
Detailed logging with timestamps for easier debugging and monitoring. -
Improved Help Command:
The!help
command now displays a categorized help menu with detailed descriptions for each command. -
Spotify Integration:
Album covers for currently playing tracks are displayed (when available), enriching the listening experience. -
Status Updates:
Real-time track information is shown in the designated update channel for maximum transparency.
Upgrade Steps:
- Add or update your
[push]
section inconfig.ini
with thebanned_titles
line. - Restart your bot after editing
config.ini
for changes to take effect. - Enjoy cleaner, more relevant now playing notifications and a more beautiful
!play
experience!
!radio - Show available stations
!play # - Play station by number
!play URL - Play custom stream URL
!stop - Stop current playback
!vol 0-100- Adjust volume
!fix - Fix stream issues
!join - Join your voice channel
!leave - Leave voice channel
!add - Add new radio station
!remove - Remove a radio station
!listradio- List all radio stations
!stats - Show bot statistics
!about - Show bot information
!help - Show command list
!setdefault - Set default stream URL
!restart - Restart the bot
!reload - Reload configuration
- Pull the Docker image:
docker pull ghcr.io/revunix/revradio:latest
- Create a config directory and config.ini:
mkdir -p /opt/revradio
cd /opt/revradio
nano config.ini
- Run the container:
docker run -d \
--name revradio \
--restart unless-stopped \
-v /opt/revradio/config.ini:/app/config.ini \
ghcr.io/revunix/revradio:latest
- Clone the repository:
git clone https://github.com/revunix/revRadio.git
- Install dependencies:
pip install -r requirements.txt
- Install FFmpeg:
# Ubuntu/Debian
sudo apt-get install ffmpeg
# CentOS
sudo yum install ffmpeg
# Windows
# Download from https://ffmpeg.org/download.html
Create config.ini
with the following structure:
[settings]
token = YOUR_DISCORD_BOT_TOKEN
channel_id = 123456789012345678
default_voice_channel_id = 223344556677889900
default_stream_url = https://stream.example.com/stream
default_volume = 50
allowed_role_ids = 1000001,1000002
client_id = YOUR_CLIENT_ID
[push]
banned_titles = ANTENNE NRW,Radio XY,Werbung,Unknown,Live-Stream,Test-Stream
[spotify]
client_id = YOUR_SPOTIFY_CLIENT_ID
client_secret = YOUR_SPOTIFY_CLIENT_SECRET
update_channel_id = 112233445566778899
[radio_stations]
station1_name = Antenne.NRW
station1_url = https://stream.antenne.nrw/antenne-nrw/stream/mp3
station2_name = Antenne 80s Hits
station2_url = https://stream.antenne.nrw/antenne-nrw-80er-hits/stream/mp3
station3_name = Antenne 80s ROCK
station3_url = https://stream.antenne.nrw/antenne-nrw-80er-rock/stream/mp3
station4_name = Antenne 80s Disco Hits
station4_url = https://stream.antenne.nrw/antenne-nrw-80er-disco-hits/stream/mp3
station5_name = Antenne 80s New Wave
station5_url = https://stream.antenne.nrw/antenne-nrw-80er-new-wave/stream/mp3
station6_name = Antenne 90s Eurodance
station6_url = https://stream.antenne.nrw/antenne-nrw-90er-eurodance/stream/mp3
station7_name = Antenne 90s Hits
station7_url = https://stream.antenne.nrw/antenne-nrw-90er-hits/stream/mp3
station8_name = Antenne 90s ROCK
station8_url = https://stream.antenne.nrw/antenne-nrw-90er-rock/stream/mp3
station9_name = Antenne 2000er Hits
station9_url = https://stream.antenne.nrw/antenne-nrw-2000er-hits/stream/mp3
station10_name = Q-DANCE
station10_url = https://22323.live.streamtheworld.com/Q_DANCE.mp3
station11_name = Chillout Lounge
station11_url = https://streams.ilovemusic.de/iloveradio24.mp3
station12_name = Rock Antenne
station12_url = https://stream.rockantenne.de/rockantenne/stream/mp3
station13_name = Jazz FM
station13_url = https://jazzfm.ice.infomaniak.ch/jazzfm-high.mp3
station14_name = 80s80s Radio
station14_url = https://streams.80s80s.de/80s80s/mp3-192/streams.80s80s.de/
station15_name = Energy Hamburg
station15_url = https://cdn.nrjaudio.fm/adwz1/de/33046/mp3_128.mp3?origine=web
station16_name = Hit Radio FFH
station16_url = https://streams.ffh.de/radioffh/mp3/hq
station17_name = BBC Radio 1
station17_url = http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio1_mf_q
station18_name = NDR 2
station18_url = http://ndr-ndr2-niedersachsen.cast.addradio.de/ndr/ndr2/niedersachsen/mp3/128/stream.mp3
station19_name = Radio Paradise
station19_url = http://stream.radioparadise.com/mp3-192
station20_name = Sunshine Live
station20_url = https://stream.sunshine-live.de/live/mp3-192/stream.sunshine-live.de/
station21_name = Klassik Radio
station21_url = http://klassikr.streamabc.net/klr-mp3-128/klr/klr-mp3-128/klr.mp3
version: '3.8'
services:
revradio:
image: ghcr.io/revunix/revradio:latest
container_name: revradio
restart: unless-stopped
volumes:
- /opt/revradio/config.ini:/app/config.ini
- Docker Engine 20.10+
- Docker Compose (optional)
- Python 3.8+
- FFmpeg
- Required Python packages:
- discord.py
- psutil
- aiohttp
- configparser
docker logs revradio
# Stop the bot
docker stop revradio
# Start the bot
docker start revradio
# Restart the bot
docker restart revradio
# Remove the container
docker rm -f revradio
Check discord_radio_bot.log
in the installation directory.
For support, feature requests, or bug reports, please open an issue on GitHub.
This project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ by REVUNIX
Remember to star β the repository if you find it useful!