Music bot with the possibility to add new cool features!
- Scalable to add new categories and features easily 🛫
- Works in multiple servers at the same time 💻
- YouTube and Spotify support 📼
- Slash Commands and text commands support 🤖
- Node 16
- discord.js
- @discordjs/voice handle voice request
- @discordjs/opus required by @discordjs/voice
- ytdl-core to get info of YouTube videos
- FFmpeg to encode the stream
- spotify-url-info to get Spotify info without the official API
This library limits 100 tracks per playlist. In case you want to use the Spotify API just uncomment the code in the
src/commands/music/trackFactory.ts
and add these two variables to the.env
:CLIENT_ID_SPOTIFY
andCLIENT_SECRET_SPOTIFY
Name | Description | Options |
---|---|---|
/back, -b or -back | Skips to the previous song | |
/clear, -cl or -clear | Removes all tracks from the queue | |
/disconnect, -d or -disconnect | Disconnects the bot from your voice channel | |
/jump, -j or -jump | Jump to a specific track | <position> |
/loop, -l or -loop | Changes the looping mode | |
/next, -n or -next | Skips to the next song | |
/pause, -ps or -pause | Pause the player | |
/play, -p or -play | Play a song in your voice channel | <input> |
/playnext, -pn or -playnext | Queue a song immediately after | <input> |
/queue, -q or -queue | Displays the current queue of the tracks | |
/remove, -r or -remove | Removes the specific track | <position> |
/shuffle, -sh or -shuffle | Shuffles the queue | |
/unpause, -unps or -unpause | Resumes the player | |
/ping or -ping | Pings the bot |
- Install FFMPEG
- Clone the repository. (
git clone https://github.com/dvalbuena1/Discord-Bot
) - Rename the
.env.example
as.env
and fill itDISCORD_CLIENT_ID
the client id of your Discord BotDISCORD_TOKEN
the client secret of your Discord Bot
- Install the dependencies. (
npm install
) - Run the bot! (
npm run build
)
- Rename the
.env.example
as.env
and fill it - Execute the next lines
docker build --pull --rm -f "Dockerfile" -t discordbot:latest "."
docker run -d discordbot