Skip to content

munozrc/yt-music-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

29 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

yt-music-bot

๐ŸŽต A Discord music bot built with TypeScript that streams music from YouTube ๐Ÿ”ฅ

โœจ Features

  • ๐Ÿ”ฅ 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.)

๐Ÿš€ Getting Started

Clone the repository

git clone https://github.com/munozrc/yt-music-bot.git
cd yt-music-bot

Install dependencies

npm install

โš™๏ธ Configure your bot

  1. Copy .env.example to .env:
cp .env.example .env
  1. 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).

โ–ถ๏ธ Run the bot

npm run dev

For production:

npm run build
npm start

๐Ÿ“œ Commands

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

๐Ÿ› ๏ธ Built With

  • Discord.js v14 โ€“ Interact with the Discord API
  • TypeScript โ€“ Typed JavaScript
  • youtubei.js โ€“ Download YouTube streams
  • dotenv โ€“ Manage environment variables

๐Ÿ“– License

This project is licensed under the AGPL-3.0 license.

๐Ÿ“ซ Contact

Created with โค๏ธ by @munozrc

About

๐ŸŽต A Discord music bot built with TypeScript that streams music from YouTube ๐Ÿ”ฅ

Resources

License

Stars

Watchers

Forks