A Discord bot for osu!

Overview

osu profile

This is the mostly-complete repo for the owo Discord osu! bot which you can invite here. As you look through this repo, please keep in mind that all of this code is written for me and not for anyone else, so the only consideration for code structure is that it's convenient and works for me. Here's a quick FAQ section for you programmers or anyone who's considering trying to get this to work on your end. For a full list of commands, visit the website here.

Overview of Features

Firstly, if you're annoyed by the implicitly triggered "owo"-type commands, I'm with you - do >funadmin prefixless to disable them.

Secondly, if you haven't already, link your osu! account by doing >osuset user "your username"; if you have a space in your name, use quotes. The official server can provide verification for your account if you have your discord information on your osu! profile (settings section). If you wish to link your account to a private server, append the suffix -(server name) e.g. (>osuset user "your username" -ripple); things like rx are not needed in the server name when setting user. Do >botinfo to view supported private servers.

Table of Contents

Profile Commands

Firstly, to view some basic profile information, there are four commands: >osu >taiko >ctb >mania. If no parameters are provided, they will display the information of the account you linked, otherwise, it will use your input as a username and find that user's info. Examples: >osu Stevy, >taiko syaron105, >ctb AutoLs, >mania Jakads.

osu profile taiko profile ctb profile mania profile

If you append -d to any one of those, you will get a detailed profile. If you append -s, you will get some calculated statistics for the user using their top plays. Examples: >osu -d "Stevy", >osu -s "chocomint".

detailed profile stats profile

Return to Table of Contents

Top Play Commands

Next, there are the top commands: >osutop >taikotop >ctbtop >maniatop. Input convention follows the "core" commands from above. This will display your top 5 plays for that gamemode. Example: >osutop "chocomint".

osutop

The top command supports various types of sorting and filtering functions. By appending tags, you can sort by accuracy (-acc), max combo (-c), rank achieved (-rk), and score (-sc). You can filter by using tags like index (-i #) and mod (-m (mods)). Additionally, there is a no-choke option (-nc) that will calculate hypothetical no-choke plays for your entire top 100 - sorting and filters can be applied here as well. There is also a supporter feature (-im) that allows you to generate a score image of one of your plays. If you'd like to support, do >support or visit the patreon page. Examples: >osutop chocomint -nc, >osutop chocomint -im -i 3

no choke score image

For more information, use the >help command on the respective top command (e.g. >help osutop) in Discord or visit the website for examples.

Return to Table of Contents

Map Recommendations

The bot can give recommendations for any mode based on a user's top 15 plays and mods in the respective mode (e.g. >recommend or >r). If you think a recommendation is too easy, use the -f or farm parameter; the higher the number, the more farmy. If you don't like the mods it gives, you can specify by just writing the mod afterwards, like HDDT. If you want a specific ar, use the -ar tag. You can also use ranges, like 4-5. However, it should be noted that for non-std recommendations, only the -pp and -f options work. For more information, visit the website. Example: >r -f 10 -ar 10-10.4 HDDT -pp 300-350 (Farm rating = 10 (easy to farm), AR = 10-10.4, mods = HDDT, target pp = 300-350).

rec image

Return to Table of Contents

Tracking

To track a user or users, type the command >track add (username) (username2) .... The default mode and number tracked is 0 (std) and 50. To specify the # of top plays to be notified about, append -t # to the command. To specify the modes to be tracked, append -m (modes) to your command; 0=std, 1=taiko, 2=ctb, 3=mania. e.g. >track add -m 23 -t 75 Stevy would track the top 75 plays for Stevy on that channel for modes 2 and 3. You can also track certain countries and the number of players by appending -c and a two-character country code or global, and specify the number of top players using -p #. The number of top plays and the modes are, again, defined by -t and -m, respectively. Please keep in mind that servers have a default track limit of 200 players, but tracking a country's top 30 players for 3 different gamemodes will only add 30 to your list! If you made a mistake in adding a user, simply use the add command again.

If you want to completely overwrite with new options, use -o. If you want to remove that user or users from tracking, use >track remove (username) (username2) .... If you want to clear all people on the server, do >track remove -a. If you want to clear a single channel, do track remove -ch in that channel. For more info, use >help track add or visit the website.

Return to Table of Contents

Map Feed

The bot can track newly qualified, ranked, and loved maps for all gamemodes. To enable, pick a channel and do >mapfeed. By default, the bot will display all new maps that are either qualified, ranked, or loved and in all gamemodes. To filter what maps gets displayed, you can introduce filters such as excluded mappers (-xmpr) or least stars (-ls) to only get beatmap sets containing at least one map with a star value greater than what was specified. To view your settings, do >mapfeed -info. To remove a channel from the map feed, do >mapfeed -rm. For more information, visit the website. An example of a newly ranked map is shown below.

map feed image

Return to Table of Contents

Implicit Commands

There are a few passive triggers for owo, mostly to do with osu links and screenshots. There is a 5 second cooldown per server when any of these are triggered. The way to disable all of these server-wide is >osuadmin implicit. To toggle, do the command again. Below are ways to selectively enable/disable different links.

Beatmap Links

If a beatmap linked from the official site is posted, owo will post that map's information, pp information, along with some download links. If it is a single beatmap, a graph (only accurate for std) will be displayed. If it's a beatmap set, the top 3 difficulties will be displayed. If you wanted to see how certain mods will effect the map's pp values, you can simply append +(mods) to the end of the link. This is very similar to the >map command. Examples: https://osu.ppy.sh/beatmapsets/93523#osu/252238, https://osu.ppy.sh/beatmapsets/93523#osu/252238 +HDHR

beatmap image beatmap_mod image

Return to Table of Contents

User Links

The bot also detects user links and displays them in the same format as the basic profile commands. Example: https://osu.ppy.sh/users/5053158.

user link image

Screenshots

The bot is able to detect maps from screenshots (to varying degrees of accuracy...). If a top or recent play is detected, then it will provide some information of that play, otherwise, it will only be the map information. The screenshot must be from the official server or directly from the game (no modified filenames). Normally, screenshot files should follow the format screenshot#.png.

screenshot image

Toggling Implicit/Passive Settings

To toggle settings for link and screenshot detection, use the >osuadmin command and sub-commands. Toggling the implicit setting will enable/disable all link/screenshot detection (e.g. >osuadmin implicit). Sub-commands like beatmapurl will disable beatmap url detection. Other options are listed in the osuadmin stem command. To get an overview of your settings (not just for osu!), do >overview. Example: >overview.

overview image

Getting More Info w/ >help

As mentioned previously, if you want to explore more stuff about the bot, use the >help or >h command. If you are dealing with a nested command, you can do something like >h track add. You can also visit the website which includes many examples. Example: >h track add.

help image

Return to Table of Contents

Coding FAQ

Why are cogs mostly in a huge file and not separated?

Writing in a single file is extremely convenient for me to apply hotfixes and reload the module. Hotfixing and reloading are far-preferred over restarting because the bot takes about 15 minutes to log in all shards due to Discord API rate limit restrictions. After fiddling around with importlib for several days, I haven't been successful in reloading files that aren't the one the cog is located in. If you have gotten this to work in Python/discord.py, then I'd love to know about it.

What is with all this spaghetti code?

Like you, my intensions aren't to write code that is unreadable. But when things get as complex as they do with new feature requests coming in every week, you just give into the mess while trying to implement things as fast as possible. So as I said up top, this code is for no one and is not meant to be read. To me, if it works, it works.

Why are there so many unspecified try-catches?

At some point, you just get tired of seeing errors in your console from bad user inputs. Doing this is akin to this meme.

Will you ever upload the databases you use?

No, there is too much back-end going on and helping everyone get the database working will be a hassle.

I have osu API questions, can you help?

Yeah, of course! I'm open to any questions if people need help with the osu! API or programming questions in general. Although, after reading this code, I'm not so sure you'd want it! But if you still do, feel free to chat in the Discord server.

Return to Table of Contents

Owner
Stevy
I'm a Stevy person.
Stevy
Script Crack Facebook, and Instagram ๐Ÿšถโ€โ™‚

in-mbf Script Crack Facebook, and Instagram ๐Ÿšถโ€โ™‚ Bukti Install Script $ pkg update && pkg upgrade $ pkg install git $ pkg install python2 $ pip2 insta

Yumasaa 5 Dec 27, 2021
an OSU! bot sdk based on IRC

osu-bot-sdk an OSU! bot sdk based on IRC Start! The following is an example of event triggering import osu_irc_sdk from osu_irc_sdk import models bot

chinosk 2 Dec 16, 2021
Small Python Tracker clone of Electra

Discord Bot Tracker - Python Simply Track your Bots (Status) to get notified when one of those go offline/online. Paste IDs into the config.py files,

Koni 2 Nov 23, 2021
Exchange indicators & Basic functions for Binance API.

binance-ema Exchange indicators & Basic functions for Binance API. This python library has been written to calculate SMA, EMA, MACD etc. functions wit

Emre MENTEลžE 24 Jan 06, 2023
A robust, low-level connector for the Discord API

Bauxite Bauxite is a robust, low-level connector for the Discord API. What is Bauxite for? Bauxite is made for two main purposes: Creating higher-leve

1 Dec 04, 2021
An open-source Discord bot that alerts your server when it's Funky Monkey Friday!

Funky-Monkey-Friday-Bot An open-source Discord bot that alerts your server when it's Funky Monkey Friday! Add it to your server here! https://discord.

Cole Swinford 0 Nov 10, 2022
Wakatime Response In javascript and python

Project Title Wakatime Response In javascript and python Description just for refrence Getting Started Dependencies For Python: requests json For Java

Gjenius20 1 Dec 31, 2021
Discord ToolBox is a discord bot developed by DJD320 created for the purpose of having some convenient tools in the form of a single bot.

Discord ToolBox Discord ToolBox is a discord bot developed by DJD320 created for the purpose of having some convenient tools in the form of a single b

3 Aug 07, 2021
๐€ ๐ฆ๐จ๐๐ฎ๐ฅ๐š๐ซ ๐“๐ž๐ฅ๐ž๐ ๐ซ๐š๐ฆ ๐†๐ซ๐จ๐ฎ๐ฉ ๐ฆ๐š๐ง๐š๐ ๐ž๐ฆ๐ž๐ง๐ญ ๐›๐จ๐ญ ๐ฐ๐ข๐ญ๐ก ๐ฎ๐ฅ๐ญ๐ข๐ฆ๐š๐ญ๐ž ๐Ÿ๐ž๐š๐ญ๐ฎ๐ซ๐ž๐ฌ !!

๐‡๐จ๐ฐ ๐“๐จ ๐ƒ๐ž๐ฉ๐ฅ๐จ๐ฒ For easiest way to deploy this Bot click on the below button ๐Œ๐š๐๐ž ๐๐ฒ ๐’๐ฎ๐ฉ๐ฉ๐จ๐ซ๐ญ ๐†๐ซ๐จ๐ฎ๐ฉ ๐’๐จ๐ฎ๐ซ๐œ๐ž๐ฌ ๐†๐ž๐ง๐ž?

Mukesh Solanki 4 Oct 18, 2021
Simple web browser to visualize HiC tracks

HiCBrowser : A simple web browser to visualize Hi-C and other genomic tracks Fidel Ramirez, Josรฉ Villaveces, Vivek Bhardwaj Installation You can insta

The deepTools ecosystem 14 Jun 21, 2022
WatonAPI is an API used to connect to spigot servers with the WatonPlugin to communicate.

WatonAPI is an API used to connect to spigot servers with the WatonPlugin to communicate. You can send messages to the server and read messages, making it useful for cross-chat programs.

Waton 1 Nov 22, 2021
Black-hat with python

black-hat_python Advantages - More advance tool Easy to use allows updating tool update - run bash update.sh Here -: Command to install tool main- clo

Hackers Tech 2 Feb 10, 2022
This is a straightforward python implementation to specifically grab basic infos about IPO companies in China from Sina Stock website.

SinaStockBasicInfoCollect This is a straightforward python implementation to specifically grab basic infos about IPO companies in China from Sina Stoc

CrosSea 1 Dec 09, 2021
My homeserver setup. Everything managed securely using Portainer.

homeserver-traefik-portainer Features: access all services with free TLS from letsencrypt using your own domain running a side project is super simple

Tomasz Wรณjcik 44 Jan 03, 2023
A simple telegram bot to save restricted content with custom thumbmail support by Mahesh Chauhan

Save Restricted Content Bot A simple telegram bot to save restricted content with custom thumbmail support by Mahesh Chauhan. Variables API_ID API_HAS

Mahesh Chauhan 532 Jan 02, 2023
KaydyPurge - Python Purge Script for Discord made by Kaydy Cain#0001

How to Install Open terminal Execute "git clone https://github.com/apolo1337/Kay

apolo 5 Jan 27, 2022
Plugin for Sentry which allows sending notification via Telegram messenger.

Sentry Telegram Plugin for Sentry which allows sending notification via Telegram messenger. Presented plugin tested with Sentry from 8.9 to 9.1.1. DIS

Shmele 208 Dec 30, 2022
This is a unofficial library for making bots in rubika.

rubika this is a unofficial library for making bots in rubika using this library you can make your own0 rubika bot and control that those bots that ma

Bahman 50 Jan 02, 2023
A Telegram Bot to manage your music channel with some cool features.

Music Channel Manager V2 A Telegram Bot to manage your music channel with some cool features like appending your predefined username to the musics tag

11 Oct 21, 2022