Third iteration of my Discord bot, this time with an unhealthy level of overengineering.
Rename .env.example
to .env
and fill it with actual values.
scripts/get-assets
docker compose up -d # launch
docker compose logs -f # check logs
docker compose down # shutdown
sudo apt update
sudo apt install -y \
python3 python3-pip ffmpeg sqlite3 curl git build-essential pkg-config \
python3-dev libssl-dev libclang-dev libpango1.0-dev libcairo2-dev librsvg2-dev
curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
rustup toolchain install nightly
python3 -m pip install --break-system-packages pipenv
pipenv install --dev
scripts/get-assets
scripts/get-deps
pipenv run cargo run # build and run in debug mode
pipenv run cargo run --release # build and run in release mode
pipenv run cargo build # build in debug mode
pipenv run target/debug/riamu # run the debug build w/o cargo
pipenv run cargo build --release # build in release mode
pipenv run target/release/riamu # run the release build w/o cargo
pipenv run cargo test --workspace # rust
pipenv run pytest -v -n auto --dist loadscope python # python
cargo clippy --workspace # just lint
cargo clippy --workspace --fix --allow-dirty --allow-staged --broken-code # lint & fix
# acquire prod database over ssh
ssh [email protected] 'docker cp riamu.v3:/app/data - | gzip' | tar -xzv --strip-components=1
# query local database
sqlite3 -box -cmd '.load deps/sqlean' db.sqlite
# query dockerized database
docker run --volumes-from riamu.v3 --rm -it alpine \
sh -c 'apk add sqlite && sqlite3 -box /app/data/db.sqlite'
- Python interop
- A proc macro for slash commands
- Decent enough error handling with unique error ids
- Subcommands support
- Respect attachment size limits
- File storage system for large files
- Core commands basic functionality
-
/download
– yt-dlp wrapper -
/deezer
– deezer downloading -
/tiktok
– tiktok downloading
-
- More commands
- Rate limits, permissions
- Improved error handling
- All common cases handled gracefully
- Using ephemeral messages
- Using
anyhow::Context
or similar
- Context menus, auto-complete, etc.
- Some way to support Deezer/Spotify playlists
- gallery-dl