A simple discord bot that playies music.
Each discord server that is connected will have a sepparet config in server_configs folder.
You can find the tutorial about building a discord music bot here.
- Play music
- Skip songs
- Stop music
- Adjust volume of music
First, make sure you have all the required tools installed on your local machine then continue with these steps.
# Clone the repository
git clone https://github.com/ZpeedTube/muzic-bot.git
# Enter into the directory
cd muzic-bot/
# Install the dependencies
npm install
After cloning the project and installing all dependencies, you need to add your Discord API token in the config.json file.
node index.js
# Build the image
docker build --tag discordbot .
# Run the image
docker run -d discordbot
Here is a list of common errors and how you can fix them.
The packages used in this repository get updated often, especially the ytdl-core package. That is why it is always worth a try updating those if you get an error like invalid URL: undefined
or when the bot crashes when running the play command.
npm install ytdl-core@latest
The play
command requires FFMPEG to be installed on the machine that is running the bot. You can download it on the official FFMPEG website. Note: This isn't relevant if you use the Dockerfile because it will install FFMPEG inside of the container.
https://github.com/TannerGabriel/discord-bot
This project is licensed under the MIT License - see the LICENSE.md file for details