A feature-rich discord bot with functionality all around osu!
- check recent plays (
<r
//rs
) - track top scores (
<track
,<trackmania
, ... //track
) - a background guessing game (
/bg
) - display the personal top scores with various filters and orderings (
<top
//top
) - show your best scores on a map (
<c
//cs
) - compare top scores among players (
<common
//compare top
) - check a map's global leaderboards (
<lb
//leaderboard
) - calculate a performance rating for players of a multiplayer match (
<mc
//matchcost
) - live track an ongoing multiplayer match (
/matchlive
) - simulate scores with arbitrary acc, combo, amount 300s, ... (
/simulate
) - display a bunch of statistics all around a users osu profile (
<osu
,<taiko
, ... //profile
) - recalculate the personal top 100 if all scores were unchoked (
<nc
//nochoke
) - show all scores of a user that are in the top of a map's global leaderboard (
<osg
//osustats scores
) - list server members in order of some attribute in their osu! profile like pp, medal count, ... (
/serverleaderboard
) - notify a channel when a twitch streams comes online (
/trackstream
/<addstream
) - ... and a ton more
All osu! gamemodes are supported and commands exist as slash commands as well as prefix commands.
With the <help
command the bot will DM you a list of all available prefix commands. With <help [command name]
(e.g. <help osg
) the bot will explain the command, show how to use it and give examples.
For help on slash commands, use the /help
command.
To invite the bot to your server, use this link.
You can also join its discord server to keep up with updates, suggest features or report bugs.
- Hubz for the main icon and slick webpages
- 5joshi for these CRAZY GOOD reaction emotes :)
- Mr Helix and his website huismetbenen for providing snipe data
- Piotrekol and Ezoda and their website osustats for providing leaderboard data
- mulraf, Hubz, and the rest of the osekai team for providing medal data
- nzbasic and his website osutracker for providing global data and country top scores
- OMKelderman and his flag conversion service
- respektive for his score rank api
- Difficulty & performance calculation: rosu-pp
- osu!api: rosu-v2
- Discord: twilight
- Database: sqlx (postgres)
- Redis: bb8-redis
- Server: routerify
I wouldn't necessarily recommend to try and get the bot running yourself but feel free to give it a shot.
Rust must be installed and additionally either docker must be installed to setup the databases automatically (recommended) or postgres and redis must be installed manually.
- Copy the content of
.env.example
into a new file.env
and provide all of its variables. The most important ones areDISCORD_TOKEN
OSU_CLIENT_ID
OSU_CLIENT_SECRET
MAP_PATH
- If you don't run through docker, be sure these env variables are also set
DATABASE_URL
REDIS_HOST
REDIS_PORT
- If you do run through docker, you can
- boot up the databases with
docker-compose up -d
(must be done) - use
docker ps
to make surebathbot-db
andbathbot-redis
have the statusUp
- inspect the postgres container with
docker exec -it bathbot-db psql -U bathbot -d bathbot
- inspect the redis container with
docker exec -it bathbot-redis redis-cli
- shut the databases down with
docker-compose down
- boot up the databases with
- Next, install
sqlx-cli
if you haven't already. You can do so withcargo install sqlx-cli --no-default-features --features postgres,rustls
. - Then migrate the database with
sqlx migrate run
. This command will complain if theDATABASE_URL
variable in.env
is not correct. - And finally you can compile and run the bot with
cargo run
. Be sure you have a hobby or some other activity to do while you get to enjoy the rust compilation times™️.
If the --release
flag is set when compiling, the bot will be faster and have a few additional features such as
- host a server on
INTERNAL_IP:INTERNAL_PORT
(.env
variables) with endpoints related to linking osu! accounts or/metrics
to expose metric data which you can make use of through something like prometheus and visualize with grafana - osu! top score tracking
- twitch stream tracking
- matchlive tracking