A feature-rich discord bot with functionality all around osu!
<r
/ /rs
)<track
, <trackmania
, ... / /track
)/bg
)<top
/ /top
)<c
/ /cs
)<common
/ /compare top
)<lb
/ /leaderboard
)<mc
/ /matchcost
)/matchlive
)/simulate
)<osu
, <taiko
, ... / /profile
)<nc
/ /nochoke
)<osg
/ /osustats scores
)/serverleaderboard
)/trackstream
/ <addstream
)/config
, /serverconfig
)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.
You can also join its discord server to keep up with updates, suggest features or report bugs.
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.
.env.example
into a new file .env
and provide all of its variables. The most important ones are
DISCORD_TOKEN
OSU_CLIENT_ID
OSU_CLIENT_SECRET
MAP_PATH
DATABASE_URL
REDIS_HOST
REDIS_PORT
docker-compose up -d
(must be done)docker ps
to make sure bathbot-db
and bathbot-redis
have the status Up
docker exec -it bathbot-db psql -U bathbot -d bathbot
docker exec -it bathbot-redis redis-cli
docker-compose down
sqlx-cli
if you haven't already. You can do so with cargo install sqlx-cli --no-default-features --features postgres,rustls
.cd bathbot-psql
and migrate the database with sqlx migrate run
. This command will complain if the DATABASE_URL
variable in .env
is not correct.cd ..
again to compile and run the bot with cargo run
. To make the bot run faster but compiling take longer, use cargo run --release
.The bot also has various features that can be enabled in compilation:
global_slash
: Instead of only registering slash commands in the server specified as DEV_GUILD_ID
in the .env
, register them globally so that they work in all servers and DMs.matchlive
: Enables the matchlive commands and a background loop that regularly checks all tracked matches for updates.osutracking
: Enables the osu tracking commands and a background loop that regularly checks all tracked users' top plays for updates.twitchtracking
: Enables the stream tracking commands and a background loop that regularly checks all tracked streams for activity.server
: Runs a server on localhost:{SERVER_PORT}
(specified in .env
) and enables the link command. In order for linking and its authentication to succeed, you must configure the redirect URL in your osu! (and twitch) settings and set PUBLIC_URL
in the .env
accordingly. E.g for osu! you go to your profile settings, check the oauth section for your own clients, edit the Application Callback URL to http://localhost:27272/auth/osu
and in your .env
make sure you have SERVER_PORT=27272
and PUBLIC_URL="http://localhost:27272"
. The server also exposes a /metrics
endpoint providing prometheus data. If you're interested in visualizing them, you need to install prometheus, configure it, install and configure grafana, then create a dashboard in grafana for the bathbot metrics.full
: Enables all of the aboveTo enable these features, use e.g. cargo run --features global_slash,server