๐ต A Discord music bot built with TypeScript that streams music from YouTube ๐ฅ
- ๐ฅ Play music directly from YouTube links or search queries
- ๐ถ Supports playlists and individual tracks
- ๐ Autoplay: automatically plays related songs after the queue ends
- โฏ๏ธ Controls: play, pause, skip, stop, volume, queue
- ๐ Slash command support (
/play,/skip, etc.)
git clone https://github.com/munozrc/yt-music-bot.git
cd yt-music-botnpm install- Copy
.env.exampleto.env:
cp .env.example .env- Fill in your Discord bot token and other configs in
.env.
| Variable | Description |
|---|---|
DISCORD_TOKEN |
Your Discord bot token. |
CLIENT_ID |
Your botโs application client ID. |
GUILD_ID |
(Optional) Guild ID for testing slash commands. |
DEBUG |
(Optional) Enable detailed debug logs (true or false). |
npm run devFor production:
npm run build
npm start| Command | Description |
|---|---|
/play <query> |
Play a song or playlist from YouTube |
/skip |
Skip to the next track |
/stop |
Stop the music and clear the queue |
/queue |
Show current queue |
/pause |
Pause playback |
/resume |
Resume playback |
/volume <1-100> |
Set the playback volume |
- Discord.js v14 โ Interact with the Discord API
- TypeScript โ Typed JavaScript
- youtubei.js โ Download YouTube streams
- dotenv โ Manage environment variables
This project is licensed under the AGPL-3.0 license.
Created with โค๏ธ by @munozrc