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
.envwith theDISCORD_TOKENandDISCORD_APP_IDenvironment variables respectively. - Define
DATABASE_URL,PG_USER,PG_PASSWORDfor the Postgres database. - Optional define
SPOTIFY_CLIENT_IDandSPOTIFY_CLIENT_SECRETfor Spotify support. - Optional define
OPENAI_API_KEYfor chatgpt support. - Optional define
VIRUSTOTAL_API_KEYfor 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:latestMake 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-dlpbrew install autoconf automake libtool ffmpeg
pip install -U yt-dlpIf 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-dlpIf 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-configThe following command will run all tests:
cargo +nightly test --all-features --workspaceSome 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-features --workspacecargo +nightly clippy --profile=release --all-features --workspace -- -D warnings -D clippy:allcargo +nightly build --profile=release --features crack-osint,crack-bf,crack-fpt --workspace --lockedcargo dist init --hosting github
# make change `pr-run-mode = "upload"`
git add .
git commit -am "chore: cargo-dist"
cargo dist build --profile=release --features crack-gpt,crack-bf,crack-osintgit tag vX.X.X
git push --tags
# publish to crates.io (optional)
cargo publishWithin the project folder, simply run the following:
docker build -t cracktunes .
docker compose up -dOriginally forked from Parrot
