an OSU! bot sdk based on IRC

Overview

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 = osu_irc_sdk.OsuBot("your name", "your password", debug=True)  # see: https://osu.ppy.sh/p/irc

@bot.receiver(models.Codes.run_after_start)
def rrr():
    # Create a game room immediately after startup
    bot.logger("create room", bot.api.room_create("my test room", "114514", True, 4), test=True)


@bot.receiver(models.Codes.someone_joined_room)
def join(event: models.Message):
    bot.logger(f"{event.name} joined: {event.message}", test=True)


@bot.receiver(models.Codes.private_message)
def pmessage(event: models.Message):
    bot.logger(f"Get private chat: {event.name} - {event.message}")
    # bot.api.send_private_message(event.name, f"我是复读机: {event.message}")


@bot.receiver(models.Codes.channel_message)
def cmessage(event: models.Message):
    bot.logger(f"Message from {event.channel_id} :{event.name} - {event.message}")
    # bot.api.send_private_message(event.channel_id, f"{event.message}")

@bot.receiver(models.Codes.someone_joined_slot)
def join_slot(event: models.Message):
    bot.logger(f"{event.name} joined {event.channel_id} - {event.message} slot", test=True)
    if bot.name == event.name:
        bot.api.room_set_host(event.channel_id, event.name)


@bot.receiver(models.Codes.someone_changed_slot)
def change_slot(event: models.Message):
    bot.logger(f"{event.name} in {event.channel_id}, moved to {event.message} slot", test=True)


@bot.receiver(models.Codes.changed_song)
def cs(event: models.Message):
    bot.logger(f"room: {event.channel_id} changed song: {event.message}", test=True)

@bot.receiver(models.Codes.someone_left_room)
def lft(event: models.Message):
    bot.logger(f"{event.name} left: {event.channel_id}", test=True)

@bot.receiver(models.Codes.changed_host)
def chst(event: models.Message):
    bot.logger(f"{event.name} became the host of {event.channel_id}", test=True)

@bot.receiver(models.Codes.match_closed)
def clst(event: models.Message):
    bot.logger(f"room {event.channel_id} closed", test=True)

@bot.receiver(models.Codes.all_players_are_ready)
def rdy(event: models.Message):
    bot.logger(f"room: {event.channel_id} all players are ready", test=True)

@bot.receiver(models.Codes.user_finished_playing)
def fsh(event: models.UserGrade):
    bot.logger(f"room: {event.channel_id} player: {event.name} completed game, score: {event.score}, is_pass: {event.is_pass}",
               test=True)

@bot.receiver(models.Codes.host_is_changing_map)
def cmp(event: models.Message):
    bot.logger(f"room: {event.channel_id} is revising map", test=True)

@bot.receiver(models.Codes.match_has_started)
def stt(event: models.Message):
    bot.logger(f"room: {event.channel_id} started the match", test=True)

@bot.receiver(models.Codes.match_finished)
def stf(event: models.Message):
    bot.logger(f"room: {event.channel_id} - match has finished", test=True)


bot.strat()

Events

  • models.Codes
run_after_start  # This is a special event that will be executed immediately after successfully connecting to Bancho.
channel_message  # messages from room
private_message  # private message
someone_joined_room  # triggered only when a room is created
someone_joined_slot  # someone joined room
someone_changed_slot
changed_song
changed_host
someone_left_room
match_closed  # room closed
all_players_are_ready
user_finished_playing  # someone finished playing
host_is_changing_map
match_has_started
match_finished  # all players complete

API

  • OsuBot.api
send_private_message(username, message)
send_channel_message(room_id, message)  # commands are also ok
room_create(room_name, passwd="", free_mods=False, max_member="")  # it will return the room_id
room_set_passwd(room_id, passwd)
room_set_max_member(room_id, max_member)
room_set_host(room_id, host_name)
room_set_mods(room_id, mods)
room_strat_game(room_id)
room_change_map(room_id, map_id, mode="")  # mode:0/1/2/3
Owner
chinosk
awa
chinosk
Twitter-redesign - Twitter Redesign With Django

Twitter Redesign A project that tests Django and React knowledge through a twitt

Mark Jumba 1 Jun 01, 2022
Super Fast Telegram UserBot Made With Python.

Description Super Fast Telegram UserBot Made With Python. LOGO Made With Support of All Userbots Dev's Dark-Venom is a Light-Weight Userbot. It's unde

2 Sep 14, 2021
Find songs by lyrics.

LyricSearch Hi, welcome to LyricSearch - a simple (Yes), fast (Maybe), and powerful (Approach) lyric search engine. We support Three search methods to

Dicer_ 1 Dec 13, 2021
High-Resolution Differential Z-Belt Mod for V0 (with optional Kirigami support)

V0-DBM This is a high-resolution differential pulley system belt mod for the Z-axis on Voron 0 with optional Kirigami Bed support. NOTE: Alpha version

Simon Küppers 11 Jan 07, 2023
A python bot that will allow you to have maximum luck during Veve drops.

VeveBot You can follow me here Github | Twitter Features: - Click on the purchase at the time of the drop. - Be able to choose to do more than one tes

Rodz 1 Dec 04, 2021
An advanced telegram language translator bot

Made with Python3 (C) @FayasNoushad Copyright permission under MIT License License - https://github.com/FayasNoushad/Translator-Bot-V3/blob/main/LICE

Fayas Noushad 19 Dec 24, 2022
Red-mail - Advanced email sending library for Python

Red Mail Next generation email sender What is it? Red Mail is an advanced email

Mikael Koli 313 Jan 08, 2023
A Telegram user bot to count telegram channel subscriber or group member.

Subscriber Count Userbot A Telegram user bot to count telegram channel subscriber or group member. This tool is only for educational purpose. You coul

IDNCoderX 8 Nov 30, 2022
Upload on Doodstream by Url, File and also by direct forward post from other channel...

Upload on Doodstream by Url, File and also by direct forward post from other channel...

Pʀᴇᴅᴀᴛᴏʀ 8 Aug 10, 2022
AI-El-Yazisini-Tanima - Fotoğraflardaki El Yazını Yapay Zeka İle Otomatik Tanıma Yazılımı

AI-El Yazısını Tanıma Fotoğraflardaki El Yazını Yapay Zeka İle Otomatik Tanıma Yazılımı Amaç : Birden fazla makine öğrenmesi modelini bir arada kullan

Özgür Tokay 3 Mar 02, 2022
List of twitch bots n bigots

This is a collection of bot account names NamelistMASTER contains all the names we reccomend you ban in your channel Sometimes people get on that list

62 Sep 05, 2021
ANKIT-OS/TG-SESSION-HACK-BOT: A Special Repository.Telegram Bot Which Can Hack The Victim By Using That Victim Session

🔰 ᵀᴱᴸᴱᴳᴿᴬᴹ ᴴᴬᶜᴷ ᴮᴼᵀ 🔰 The owner would not be responsible for any kind of bans due to the bot. • ⚡ INSTALLING ⚡ • • 🛠️ Lᴀɴɢᴜᴀɢᴇs Aɴᴅ Tᴏᴏʟs 🔰 • If

ANKIT KUMAR 2 Dec 24, 2021
MAASTA is a wrapper to create an Ansible inventory for MAAS instances that are provisioned by Terraform.

MAASTA is a wrapper to create an Ansible inventory for MAAS instances that are provisioned by Terraform.

Saeid Bostandoust 144 Dec 16, 2022
An advanced api client for python botters.

[ALPHA] pybotters An advanced api client for python botters. 📌 Description pybottersは仮想通貨botter向けのPythonライブラリです。複数取引所に対応した非同期APIクライアントであり、bot開発により素晴ら

261 Dec 31, 2022
Gnosis-py includes a set of libraries to work with Ethereum and Gnosis projects

Gnosis-py Gnosis-py includes a set of libraries to work with Ethereum and Gnosis projects: EthereumClient, a wrapper over Web3.py Web3 client includin

Gnosis 93 Dec 23, 2022
🔮 Uncover some followers of a private instagram account

Private Instagram Chaining 🔮 Uncover part of followers of an instagram private account I have this private instagram account julianakhao. I need to g

аэт 69 Dec 17, 2022
An unofficial client library for Google Music.

gmusicapi: an unofficial API for Google Play Music gmusicapi allows control of Google Music with Python. from gmusicapi import Mobileclient api = Mob

Simon Weber 2.5k Dec 15, 2022
A beginner’s guide to train and deploy machine learning pipelines in Python using PyCaret

This model involves Insurance bill prediction, which was subsequently deployed on Heroku PaaS

1 Jan 27, 2022
Asynchronous Python Wrapper for the Ufile API

Ufile.io Asynchronous Python Wrapper for the Ufile API (Unofficial).

Gautam Kumar 16 Aug 31, 2022
ignorant allows you to check if a phone number is used on different sites like snapchat, instagram.

Ignorant For BTC Donations : 1FHDM49QfZX6pJmhjLE5tB2K6CaTLMZpXZ ignorant does not alert the target phone number ignorant allows you to check if a phon

Palenath 513 Dec 31, 2022