A Discord bot with more than 30+ commands which allows to play music on your server efficiently. Supports Youtube, Spotify, Deezer and Soundcloud links. Skips intros and blanks in the music with Sponsorblock (optional).
pip install -r requirements.txt
.Scripts/generateDatabase.sql
file to create the table.configuration example.json
:{
"token": "", // Your bot token
"prefix": "?", // Your prefix
"playlistLimit": "15", // Optional - Defaults to 15 if not provided 0 is unlimited
"sponsorblock": true, // True if you want to skip intros and blanks in the music
// Spotify => https://developer.spotify.com/dashboard/
"spotifyClientId": "", // Your Spotify ID (OPTIONAL : Spotify links support)
"spotifyClientSecret": "", // Your Spotify secret (OPTIONAL : Spotify links support)
"MySQLHost": "", // Your MySQL host
"MySQLLogin": "", // Your MySQL login
"MySQLPasword": "", // Your MySQL password
"MySQLDatabase": "" // Your MySQL database
}
configuration.json
.emojis.json
Finally, host the bot and invite it to your own server.
Lavalink.jar
(from Lavalink) with java -jar Lavalink.jar
Lavalink.jar
to control its settingspython3 main.py
./configuration.json
docker-compose build
docker-compose up -d db
docker-compose up -d
Note: In theory you can skip
docker-compose up -d db
and just rundocker-compose up -d
but the timing of the db startup and running of the generateDatabase.sql on initial startup can sometimes cause the music bot to fail to start so its best to just start the db first to give it enough time
docker-compose logs
to view logs for all servicesdocker-compose logs <service>
eg: docker-compose logs musicbot
to see the logs for a specific service (look in the compose file for the service names)docker-compose stop
to stop the music bot / db / lavalink containersdocker-compose start
to start the music bot / db / lavalink after stopping?play <Url/Query> : Search on youtube and play the music.
?search <Query> : Search a song on youtube.
?nowplaying : Display data about the current song.
?join : Add the bot to your voice channel.
?leave : Remove the bot of your voice channel.
?pause : Pause the current song.
?resume : Resume the current song.
?volume <0-100> : Change the bot's volume.
?queue : Display the queue.
?shuffle : Shuffle the queue.
?move <IndexFrom> <IndexTo> : Move a song in the queue.
?remove <Index> : Remove the song with its index.
?removedupes : Remove all duplicates song from the queue.
?leavecleanup : Remove absent user's songs from the queue.
?clear : Clear the queue.
?replay : Replay the current song.
?reload : Reload the current song.
?loop : Enable or disable the loop mode.
?loopqueue : Enable or disable the loop queue mode.
?playlist add <Url> : Add a track to your playlist.
?playlist remove <Index> : Remove a track to your playlist.
?playlist display : Display playlist's songs.
?playlist load : Add the whole playlist to the queue.
?stats : Display the bot's stats.
?support : Give a link to join the support server.
?invite : Give a link to invite the bot.
?vote : Give the Top.gg link to vote for the bot.
?help : Display the help.
?logout : Stop the bot process.
Project : https://github.com/Darkempire78/Music-Discord-Bot/projects/2
Join the Discord server !
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
This project is under GPLv3.
You should use Discord Tools to code your Discord bots on Visual Studio Code easier. Works for Python (Discord.py), Javascript (Discord.js) and Java (JDA). Generate template bot and code (snippets).