A hassle-free, highly performant, host-it-yourself, cracking smoking Discord music bot
Thanks to the guys over at alwaysdata for hosting the website, web portal, email, etc for this project for free, in their Open Source program.
- Create a bot account
- Copy the token and application id to a
.env
with theDISCORD_TOKEN
andDISCORD_APP_ID
environment variables respectively. - Define
DATABASE_URL
,PG_USER
,PG_PASSWORD
for the Postgres database. - Optional define
SPOTIFY_CLIENT_ID
andSPOTIFY_CLIENT_SECRET
for Spotify support. - Optional define
OPENAI_API_KEY
for chatgpt support. - Optional define
VIRUSTOTAL_API_KEY
for osint URL checking. - Use .env.example as a starting point.
docker run -d --env-file .env --restart unless-stopped --name cracktunes ghcr.io/cycle-five/cracktunes:latest
Make sure you've installed Rust. You can install Rust and its package manager, cargo
by following the instructions on https://rustup.rs/.
After installing the requirements below, simply run cargo run
.
The commands below install a C compiler, GNU autotools and FFmpeg, as well as yt-dlp through Python's package manager, pip.
apt install build-essential autoconf automake libtool ffmpeg
pip install -U yt-dlp
brew install autoconf automake libtool ffmpeg
pip install -U yt-dlp
If you are using the MSVC toolchain, a prebuilt DLL for Opus is already provided for you.
You will only need to download FFmpeg, and install yt-dlp which can be done through Python's package manager, pip.
pip install -U yt-dlp
If you are using Windows Subsystem for Linux (WSL), you should follow the Linux/MacOS guide, and, in addition to the other required packages, install pkg-config, which you may do by running:
apt install -y pkg-config
The following command will run all tests:
cargo +nightly test --all
Some tests are available inside the src/tests
folder, others are in their respective
files. It's recommended that you run the tests before submitting a Pull Request.
Increasing the test coverage is also welcome. Test coverage is tracked using
tarpaulin.
cargo +nightly tarpaulin --all
Within the project folder, simply run the following:
docker build -t cracktunes .
docker compose up -d
- crackgpt 0.2.0! Added back chatgpt support, which I am now self hosting for CrackTunes and is backed by GPT 4o.
- Use the rusty_ytdl library as a first try, fallback to yt-dlp if it fails.
- Remove the grafana dashboard.
- Switch to async logging.
- Add an async service to handle the database (accept writes on a channel, and write to the database in a separate thread). Eventually this could be a seperate service (REST / GRPC).
- Music channel setting (can lock music playing command and responses to a specific channel)
- Fixes in logging
- Fixes in admin commands
- Lots of refactoring code cleanup.
- Significantly improved loading speed of songs into the queue.
- Fix Youtube Playlists.
- Lots of refactoring.
- Can load spotify playlists very quickly
- Option to vote for Crack Tunes on top.gg for 12 hours of premium access.
- playlist loadspotify and playlist play commands
- Invite and voting links
- Updated serenity / poise / songbird to latest versions
- Refactored functions for creating embeds and sending messages to it's own module
/loadspotify <spotifyurl> <playlistname>
loads a spotify playlist into a Crack Tunes playlist.- voting tracking
- Playlists!
- Here are the available playlist commands
/playlist create <playlistname>
Creates a playlist with the given name/playlist delete <playlistname>
Deletes a playlist with the given name/playlist addto <playlistname>
Adds the currently playing song to/playlist list
List your playlists/playlist get <playlistname>
displays the contents of/playlist play <playlistname>
queues the given playlist on the bot
- Added pl alias for playlist
- Added /playlist list
- Fixed Requested by Field
- JSON for grafana dashboards
- Fix the requesting user not always displaying
- Reversed order of this Change Log so newest stuff is on top
- Added more breakdown of features which can be optionally turned on/off
- Telemitry
- Metrics / logging
- Removed a lot of unescesarry dependencies
- osint scan command to check urls for malicious content
- cargo update
- GuildId checks
- user authorized message
- adding scan command
- add feature for osint
- make admin commands usable by guild members with admin
- add dry run to rename_all
- fix storing auto role and timeout I think
- download and skip together
try to finally fix this fucking volume bug- fix loading guild settings
- add pgadmin to docker compose
fix volume(volume is still broken)
- Clean command
- Bug fixes
[ ] Down vote(not working)
- Dockerized!
- Refactored settings commands.
- Storing and retrieving settings from Postgres.
- Updated dependencies to be in line with current.
[] Port to next branch of serenity[] Flesh out admin commands
Didn't really track stuff here...
[] Shuttle[] Reminders[] Notes
- Bug fixes.
- Remove reliance on slash commands everywhere.
- Remove shuttle for now
- Bug fixes (volume)
- Shuttle support (still broken)
- Welcome Actions
- Play on multiple servers at once
- Play music from local files
- Play music from YouTube
- Play music from Spotify (kind of...)
Originally forked from Parrot