A simple Discord bot that can play audio in a voice channel using the discord.js
library and discord-player
. This bot supports features like playing songs from YouTube, managing a queue, pausing and resuming tracks, and skipping songs.
- Play audio from YouTube and other sources.
- Display the current song queue.
- Pause and unpause the currently playing track.
- Skip the currently playing track.
- Bun (v0.1 or later)
- Node.js (v16.9.0 or later)
- FFmpeg (for audio processing)
-
Clone the Repository
git clone https://github.com/ShinniUwU/HanaGrooveBot.git cd HanaGrooveBot
-
Install Dependencies
Ensure you have Bun installed. Run the following command to install project dependencies:
bun install
-
Create Environment Variables
Create a
.env
file in the project root and add your bot token and client ID:BOT_TOKEN=your_discord_bot_token CLIENT_ID=your_discord_client_id
-
Set Up Commands
The bot uses slash commands. Make sure to register them in your Discord server. Commands are defined in the code and registered automatically upon starting the bot.
-
Start the Bot
You can start the bot locally with:
bun run src/index.ts
-
Bot Commands
/play [song]
: Plays a song from YouTube based on the given query./queue
: Displays the current song queue./pause
: Pauses the currently playing song./unpause
: Resumes the currently paused song./skip
: Skips the currently playing song.
To make changes or contribute to the project:
-
Create a Branch
git checkout -b feature/your-feature
-
Make Changes
Modify the code as needed and test your changes.
-
Commit Changes
git add . git commit -m "Add new feature or fix"
-
Push and Create a Pull Request
git push origin feature/your-feature
Then, create a pull request on GitHub.
- Bot Not Responding: Ensure the bot has permission to connect and speak in the voice channel.
- Commands Not Working: Check if the bot is correctly registered with your server and that it has the necessary intents.
Usage of this bot is at your own risk. I am not responsible for any damages, loss of data, or violations of terms of service (ToS) that may occur as a result of using this bot. This bot is provided as-is, and I make no guarantees regarding its functionality or compliance with any third-party services.
This project is licensed under the MIT License - see the LICENSE file for details.