Cadence - A free Discord music and audio bot
🎶 A free music and audio bot for Discord. No locked functionality, free forever. Open source!
Adding the bot 🤖
To add the bot to your Discord server, click here. This will invite the bot to your Discord server.
Once the bot has joined your Discord server, there is no additional setup needed. Execute the /help command to view a list of commands to use.
Hosting the bot yourself 🔓
⚠️ Migrating from V3 to V4 (config update) and later
v4.0.0 brings a new configuration system. To migrate your old configuration, copy your config file in ./src/config.js to ./config/local.js. This will override the new default config file stored in /config/default.js. No additional actions are required, and if configurable options are missing in your ./config/local.js file, the bot will automatically use the default values from ./config/default.js.
This bot is open-source, and if you want to host it yourself, here's how you can do it:
- Install Node.js v18.16 LTS.
- Install FFmpeg latest release build. Make sure you can run
ffmpegin your terminal, for Windows, add it to your PATH. - Clone this repository and install its dependencies using
npm install. If you encounter any errors, try usenpm install --legacy-peer-deps. - Setup your
.envfile in the root directory to configure bot tokenDISCORD_BOT_TOKENand client idDISCORD_APPLICATION_ID. You obtain these from the Discord developer portal. The.env.examplefile provides an example configuration. - To make the commands accessible on Discord servers, deploy slash commands using
npm run deploy. - Start the bot using
npm start. If set up correctly, the bot should now be online and operational. You will need to invite it to a server, see Adding your bot to servers article for help.
Additional information:
- If you want to override default config options, create a file
/config/local.js. The options defined in this file will override the default configurable options in/config/default.js. See/config/default.jsfor all available options. You do not need to copy the whole/config/default.jsfile, only the options you want to override. - You can use
npm run deploy-prettyandnpm run start-prettyto get formatted, colorized output to console instead of JSON format. For this to work, you need the npm packagepino-prettyinstalled,npm install pino-pretty -gto install it globally. - Logs are stored in
/logsdirectory, you can configure the logging level to file and console in the configuration file. - For production use, we recommend using a process manager like
pm2or similar to automatically restart it the process crashes. Here is a simple setup forpm2:- Install
pm2globally:npm install pm2 -g. - In repository root directory, start the bot with
pm2 start ./src/index.js --name "Cadence". - Save the process list with
pm2 save. - To view logs with
pino-pretty, runpm2 logs 0 --out --raw | pino-pretty. Note: Does not work well in Windows PowerShell, use command prompt (cmd) to view logs withpino-prettyusing same command if you are usingpm2.
- Install
Get help and support 🛟
Encounter an issue? Open an issue in this repository or join our Discord support server for assistance.
Credits and acknowledgments 🎉
This project is made possible by using discord.js and discord-player. A special thanks to @skdhg for his work on discord-player, mediaplex and for providing feedback and help during development of this bot.
Contributors
|
Marius Begby |
Parker Owings |