Hello! I got tired of the bot that we were using, that I chose to use, that kept crashing and I didn't want to figure out how it worked, so I made my own. Feel free to use this to run your own bot.
A custom Discord music bot built with Bun and discord.js, designed to be reliable and easy to self-host.
- Music Playback: Play music, shuffle, stop, and manage queues.
- Custom Playlists: Create and play JSON-based playlists generated directly from local audio files.
- Auto-Join & Auto-Play: Configurable settings to automatically join a designated Voice Channel and start playing a default playlist.
- Per-Guild Settings: Customize behavior per server, including auto-play, default playlists, and shuffle/repeat options.
- Self-Updating: Includes a
/updatecommand and scripts to pull the latest changes from GitHub and restart the bot automatically. - Systemd Service Support: Comes with setup scripts for easy deployment as a background service on Linux.
-
Install dependencies:
bun install
-
Configuration:
- Copy
.env.EXAMPLEto.envand fill in yourDISCORD_AUTHtoken andCLIENT_ID. - Copy
guild_settings.json.exampletoguild_settings.jsonand configure your server ID, roles, and default settings.
- Copy
-
Run the bot:
bun run index.js
For self-hosting on Linux, you can install comfibeats as a systemd service.
- Run the automated setup script:
chmod +x setup_service.sh ./setup_service.sh
- See SERVICE_SETUP.md for more detailed instructions on manual setup and service management.
- Music:
/play,/playlist,/shuffle,/stop - Utility:
/settings,/generateplaylist,/joinVC,/leaveVC,/update
Created because I wanted a bot that doesn't crash. (Currently hosted on an Arch Linux container.)