A complete code to download for a music bot 🎧
Looking for a code for a music bot ? This fully open source code is made for your project !
You can try out the BOT by inviting it to your server here
This Project was made with a fork of Zerio Dev's Music BOT.
Updated to add slash commands (Yes, I folded under 0 pressure)
Setup the environment file.
- Copy the
.env.examplefile and rename it to.env - Edit the file and fill in the details accordingly.
token=
playing=
type=
CLIENT_ID=
GUILD_ID=
YTtoken=
token: the token of the bot available on the Discord Developers sectionplaying: the playing messagetype: activity type (Currently does nothing. Activity types were changed to enum and I am too tired to write switch cases. Edit type directly inready.js)CLIENT_ID: don't remember why I added this but you can get it in the application page.GUILD_ID: same, don't remember why I added this, ignore.YTtoken: You need to paste your youtube authentication token here. Run this command:npx --no discord-player-youtubeiand follow the instructions on your terminal. Use a dummy account. Paste the whole generated string.
To use the project correctly you will need some tools.
FFmpeg to process audio
Node JS (v18+) for environment
NOTE : If you are on windows, you can either have ffmpeg binaries downloaded and added to path in your system or you can try using the npm package ffmpeg-static. But if you are on Linux, do not use the npm package, instead do the following :
sudo apt updatesudo apt install ffmpeg
| Name | Description | Options |
|---|---|---|
| about | Show info about the bot | |
| help | Show the help embed | none, command name |
| invite | Invite link for the bot | |
| ping | Check the ping of the BOT | |
| back | Play the previous song | |
| clear | Clear the queue | |
| filter | Apply filters to the current queue | filter name |
| loop | Loop the queue or current track | none, queue |
| lyrics | Displays the lyrics of the current track or the track you searched | none, search term |
| nowplaying | Shows the currently playing track details with buttons | |
| pause | Pause the track | |
| play | Play a song with URL or search term | URL, search term |
| playfile | Play the file attached to this command | |
| progress | Shows the current timestamp of the track as a bar | |
| queue | Shows the queue of tracks | |
| remove | Remove a particular track from queue | track number |
| resume | Resumes the track | |
| save | Saves the name of the track to user's DMs | |
| seek | Seek to a part of track | Timestamp |
| shuffle | Shuffle the queue order | |
| skip | Skips the current song | |
| stop | Stops and disconnects the BOT | |
| volume | Set internal volume of the BOT | value |
searchcommand was removed as it is now integrated into the play command.- Added
autoplayto loop options to play similar songs when the queue ends.
Without forgetting of course the code editor ^^
Realized with ❤️ by ShambaC
Contact me on Discord for any help => ShambaC#3440

