A simple and powerful Discord music bot built using discord.js
and discord-player
.
- Play music from YouTube and other sources
- Queue management (add, remove, view, shuffle, move tracks)
- Loop modes (off, track, queue, autoplay)
- Pause, resume, and skip tracks
- Automatic disconnection on empty voice channel
- Error handling and informative messages
- Node.js v16.9.0 or higher
- ffmpeg
- A Discord bot token. You can get one by creating a new application in the Discord Developer Portal
-
Clone the repository:
git clone https://github.com/NoteNest-Bot/NoteNest-Music-bot.git cd NoteNest-Lite
-
Install dependencies:
npm install
-
Create a
.env
file in the root directory and add your bot token:TOKEN=your-bot-token
-
Customize the bot activity in
config.json
:{ "activityType": "0", // 0: Playing, 1: Streaming, 2: Listening, 3: Watching, 5: Competing "activity": "Music" }
Start the bot with the following command:
node index.js
/play [query]
- Play a song in your channel/playtop [query]
- Play a song before the next in your channel/pause
- Pause the current song/resume
- Resume the current song/skip
- Skip the current song/stop
- Stop the music and clear the queue/queue
- View the current song queue/nowplaying
- Get the song that is currently playing/shuffle
- Shuffle the song queue/remove [number]
- Remove a song from the queue/move [track] [position]
- Move a song to a different position in the queue/loop [mode]
- Set the loop mode (off, track, queue, autoplay)
/help
- List all available commands/purge [num]
- Delete the last messages in all chats
/ban [user]
- Ban a user