This is an advanced radio bot for Discord voice channels, allowing users to enjoy a wide variety of trending online radios with high quality and seamless performance.
-
Seamless Performance: Enjoy lag-free, high-quality audio playback.
-
Wide Variety of Radio Stations: Stream trending online radio stations in high quality.
-
Multilingual Support: Padio supports multiple languages. 🌍
- English (Default)
- فارسی (Farsi)
- Türkçe (Turkish - Istanbul)
- 中文 (Chinese)
- 日本語 (Japanese)
-
Customizable Prefix: Tailor the bot to your server’s needs by setting a custom command prefix.
-
User-Friendly Panel: An intuitive panel for managing radio playback and settings from within Discord.
-
Station Switching: Change radio stations effortlessly! 🎵
-
AFK Channel Reconnection: Automatically rejoin pre-configured AFK channels from the server’s database.
-
High-Quality Streaming: Experience smooth, lag-free audio. ⚡
-
Clean and Editable Code: Well-structured for new developers to easily customize. 🧹
-
Database Support: Compatible with multiple databases like SQL, JSON, Docker, and MongoDB. 💾
-
Audio Format Support: Play audio from various formats such as OGG, MP3, MP4, MKV, and M4A (coming soon).
-
/setup panel
|p!setup panel
Description: Create a radio control panel for quick and easy management. -
/setup prefix
|p!setup prefix
Description: Set a custom prefix for bot commands. -
/setup language
|p!setup language
Description: Change the bot’s language to suit your server’s needs.
-
/afk
|p!afk [channel | id]
Description: Enable AFK mode for a specified voice channel. -
/pause
|p!pause
Description: Temporarily stop the player. -
/resume
|p!resume
Description: Resume the player. -
/play
|p!play
Description: Play a radio station in the voice channel. -
/stop
|p!stop
Description: Stop the radio playback and remove the player from the voice channel. -
/volume
|p!volume [1-200]
Description: Adjust the player’s volume or display the current volume level.
-
/about
|p!about
Description: Displays information about the bot. -
/help
|p!help
Description: Display the list of available bot commands. -
/invite
|p!invite
Description: Get the invite link for the bot. -
/ping
|p!ping
Description: Display the bot’s ping. -
/report
|p!report
Description: Report any issues or bugs related to the bot.
-
p!setactivity [status:[dnd|online|idle|invisible] type:[Playing|Streaming|Listening|Watching|Custom|Competing] name:[string] url:[url|link]]
Description: Temporarily change the bot’s status. -
p!guilds [id]
Description: Display the list of servers the bot has joined.
Clone or download the project files:
git clone https://github.com/Sobhan-SRZA/Radio-Bot.git
cd Radio-Bot
Install all dependencies:
npm i
Create a .env
file from the example file:
cp .env.example .env
Now, edit the .env
file and add your bot’s required information. Here are the details for each field:
Variable | Description |
---|---|
token |
Bot Token: The token for your Discord bot. You can generate this in the Discord Developer Portal. Example: token="Your Discord Bot Token" . |
prefix |
Command Prefix: The prefix used before commands. Example: prefix="!" . |
status_activity |
Bot Status Activity: Set the status message for the bot. You can use placeholders like {members} to show the number of members, {servers} to show the number of servers, {usedCommands} to show the total number of commands used, {joinedVoiceChannels} to show how many voice channels the bot has joined, or {prefix} to show the bot's default prefix. Example: status_activity="["Use {prefix}help or /help to see bot features.", "Working in {servers} Servers", "Work for {members} Members", "Total Used Commands {usedCommands}", "Playing In {joinedVoiceChannels} Voice Channels"]" . |
status_type |
Bot Status Type: Choose the type of status, such as "Playing" , "Listening" , "Watching" , etc. Example: status_type="["Playing"]" . |
status_presence |
Bot Presence: Define whether the bot appears online, idle, or DND (Do Not Disturb). Example: status_presence="["online"]" . |
database_type |
Database Type: Choose the database type to store user and server data. Supported values: "json" , "mysql" , "mongodb" . Example: database_type="json" . |
database_mongoURL |
MongoDB URL: If using MongoDB, set the connection URL. Example: database_mongoURL="mongodb+srv://user:password@cluster.mongodb.net/dbname" . |
database_msql_host |
MySQL Host: The host for your MySQL database if using MySQL. Example: database_msql_host="localhost" . |
database_msql_user |
MySQL User: Your MySQL database username. Example: database_msql_user="root" . |
database_msql_password |
MySQL Password: Your MySQL database password. Example: database_msql_password="password" . |
database_msql_database |
MySQL Database Name: The name of your MySQL database. Example: database_msql_database="dbname" . |
support_id |
Support Server ID: The ID of your support Discord server. Example: support_stats="Some Server ID" . |
support_url |
Support Server URL: The invite link to your support server. Example: support_url="https://discord.gg/inviteCode" . |
support_stats |
Bot Stats Channel ID: The ID of the channel where bot stats should be sent. Example: support_stats="Some Channel ID" . |
webhook_url |
Webhook Logger URL: A Discord webhook URL to log important information. Example: webhook_url="Some Webhook URL" . |
webhook_avatar |
Webhook Avatar: URL to an avatar image for the webhook logger. Example: webhook_avatar="Some Image URL" . |
webhook_username |
Webhook Username: Name displayed when the webhook posts messages. Example: webhook_username="Bot Logger" . |
webhook_thread_bugs |
Bug Report Thread ID: The ID of the thread for logging errors. Example: webhook_thread_bugs="Some Thread ID" . |
webhook_thread_report |
User Report Thread ID: The ID of the thread for logging user reports. Example: webhook_thread_report="Some Thread ID" . |
webhook_thread_status |
Status Alerts Thread ID: The ID of the thread for status alerts. Example: webhook_thread_status="Some Thread ID" . |
owners |
Bot Owners: List of Discord IDs that are considered bot owners. Example: owners="["123456789012345678", "987654321098765432"]" . |
default_language |
Default Language: The default language the bot should use. Example: default_language="en" . |
anti_crash |
Anti-Crash Controller: Enable or disable the anti-crash controller. Example: anti_crash=true . |
one_guild |
One Guild Mode: Restrict bot to one guild only. Example: one_guild=true . |
logger |
Error Logging: Enable or disable sending errors to Discord via webhook. Example: logger=true . |
dashboard |
Enable Dashboard: Whether the web-based dashboard is enabled or not. Example: dashboard=true . |
dashboard_port |
Dashboard Port: The port number for the dashboard to run on. Example: dashboard_port=3000 . |
dashboard_host |
Dashboard Host URL: The host URL for the dashboard. Example: dashboard_host="http://localhost:3000" . |
Once you’ve configured the .env
file, you can start the bot by running:
npm start
This bot is built using Node.js and utilizes the following key packages:
Packages | Version | Install |
---|---|---|
discord.js | Latest ^14.16.2 | npm install discord.js |
@discordjs/voice | Latest ^0.17.0 | npm install @discordjs/voice |
dotenv | Latest ^16.4.5 | npm install dotenv |
ffmpeg-static | Latest ^5.2.0 | npm install ffmpeg-static |
quick.db | Latest ^9.1.7 | npm install quick.db |
cli-color | Latest ^2.0.4 | npm install cli-color |
libsodium-wrappers | Latest ^0.7.15 | npm install libsodium-wrappers |
opusscript | Latest ^0.0.8 | npm install opusscript |
Coded by Sobhan-SRZA for Persian Caesar. For support and assistance, join our Discord server.
This project is licensed under the BSD-3-Clause License. Please give credit to "Persian Caesar" if you face issues using this code.