Musyk is a discord bot developed using the discord-player framework to play music on discord servers.
- Music playback from multiple platforms with search functionality and playlist support.
- Queue management with skip, pause, resume, and stop commands.
- Volume control
- Playback UI for ease of use and better user experience.
- Docker support for easy deployment.
- Node.js - The bot must be run in a Node.js environment. You can download Node.js here. It is recommended to use the LTS build available for your operating system.
- FFmpeg - The bot comes with the ffmpeg-static package which should allow the bot to run without any additional setup. However, you
can install your own version of FFmpeg here. To install FFmpeg, just download the binaries and
add the folder containing the binaries to your system's
PATH
environment variable. - Discord Account - You will need to register a bot on the Discord Developer site. To do this, go to the Developer site
and click on the
New Application
button. Give your bot a name and click on theCreate
button. On the sidebar, click on theBot
tab and then click on theReset Token
button to get your bot's token. This is the token that should be used in the.ENV
file.
Download the .zip source code. Extract the contents of the .zip file and move on to the next step.
If you have Git installed, you can clone the repository using the following command:
git clone https://github.com/BernardoPe/Musyk.git
- Open a terminal and navigate to the folder where the bot's files are located.
- Run
npm install
to install the bot's dependencies. - Copy the
.env.example
file and rename it to.env
. Fill in all the required information. To get the optional Youtube access token, go to bot.ts and uncomment the line// generateOauthTokens();
. Run the bot and follow the instructions to get the token. - Run
npm start
to start the bot.
To create the bot's invite link, go to the Discord Developer site and click on your bot's application.
In the sidebar, you'll find the OAuth2 URL generator. Select the bot and applications.commands options. Once you select the bot option, a list of permissions will appear, allowing you to configure the permissions your bot needs.
After configuring the permissions, copy the generated URL and paste it into the .env file as the INVITE_LINK
variable.
You can access the bot's Docker image on Docker Hub. To run the bot using this image, you can use the following command:
docker compose up -d
Alternatively, you can use the provided Dockerfile to build the image yourself. Run the following command to build the image:
docker build -t musyk .
Then, you can run the image using the following command:
docker run -d \
--name musyk
--env-file /path/to/.env \
--restart unless-stopped \
musyk
Don't forget to fill in the .env
file with all the required information.
If you find any bugs or issues with the bot, feel free to open an issue on the repository 👍
If you find this bot useful, consider giving it a ⭐!