Running:
- Install dependencies:
pip install -r requirements.txt - Create
.envfile withIRC_NICKNAME,IRC_PASSWORD,API_ID,API_TOKEN,AHR_DIFFICULTY_MIN,AHR_DIFFICULTY_MAXandOSU_SESSIONvariables - Run
python bot.pyif you want to create a lobby orpython bot.py #mp_XXXif you want the bot to join the existing one.
API_ variables are credentials for Osu OAuth app and IRC_ vars are for
legacy API. OSU_SESSION cookie is used for downloading beatmap files.
When making the bot to join the lobby type /np to chat to let the bot pick up currently selected
song.
Difficulty range constraint won't work until a beatmap that is inside this range is selected.
Available commands:
!q– prints queue order.!q [usernames...]– defines the queue. Users not mentioned in the command are added to the end of the queue (owner-only).!qp– prints your position in the queue.!tl– time left until the end of the beatmap.!dl– downloads beatmap file, uploads it to https://temp.sh and returns the URL (owner-only).!pb [usernames...]– prints your or players' best scores on the current beatmap.!sr <on/off>– enable/disable difficulty range constraint.!sr <min> <max>– defines the difficulty range.!ahr <on/off>– enable/disable host rotation (owner-only).!skip– skip the host. Force skips if you're the host.!info– print commands list and bot status.!mirrors– show download mirrors for the current beatmap.
In !q or pb commands you can type first case-insensitive letters of player's names instead of
their full usernames (for example !q a _ if Axel and _underscore_man are in the lobby).
Chat log is saved into chat.txt. IRC message log is saved to irc.txt.
