A Discord music bot with a playback queue, slash commands, and audio streaming through yt-dlp.
- Plays audio from YouTube and SoundCloud in voice channels
- Queue management: skip, skip to, previous, remove, insert, shuffle, loop, clear
- Playback controls: pause, resume, stop, seek, volume, audio filters
- Lyrics lookup
- Discord slash commands
- Node.js 18 or newer
- yt-dlp available in the
PATH - FFmpeg available in the
PATH - A bot application from the Discord Developer Portal
git clone https://github.com/hypeblock26/vinilo.git
cd vinilo
npm installCopy .env.example to .env and fill in the values:
BOT_TOKEN=
CLIENT_ID=| Variable | Description |
|---|---|
BOT_TOKEN |
Bot token (Developer Portal → Bot → Reset Token) |
CLIENT_ID |
Application ID (Developer Portal → General Information) |
yt-dlp reads YouTube cookies from a Netscape-format cookies.txt file in the project root. This prevents YouTube from asking for bot verification during playback.
To create the file:
- Sign in to YouTube in a private browser window. A dedicated Google account is recommended.
- Export the
youtube.comcookies in Netscape format, for example with the "Get cookies.txt LOCALLY" extension. - Save the result as
cookies.txtin the project root. - Close the private window.
The cookies grant access to the Google account they were exported from. cookies.txt is excluded by .gitignore and should stay out of version control.
Register the slash commands (first run, or after adding commands):
node Deploy.jsStart the bot:
node index.jsEach command lives in its own file under commands/:
play, pause, resume, stop, skip, skipto, previous, queue, nowplaying, remove, insert, clearqueue, shuffle, loop, seek, volume, filter, lyrics, join, ping
.
├── commands/ Slash command definitions
├── Deploy.js Registers slash commands with Discord
├── Musicqueue.js Queue and playback logic
├── index.js Bot entry point
├── .env.example Example environment variables
└── package.json
- Clone your fork:
git clone https://github.com/your-username/vinilo.git - Create your feature branch:
git checkout -b my-new-feature - Stage changes:
git add . - Commit your changes:
git commit -m "Add my new feature" - Push to the branch:
git push origin my-new-feature - Submit a pull request
##Translators: