mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
!
This commit is contained in:
parent
b7b2dd34cc
commit
85a358c08a
2 changed files with 8 additions and 8 deletions
8
db.py
8
db.py
|
@ -650,10 +650,10 @@ class Osu(Base, Mini):
|
||||||
r3.raise_for_status()
|
r3.raise_for_status()
|
||||||
j3 = r3.json()[0]
|
j3 = r3.json()[0]
|
||||||
self.osu_name = j0["username"]
|
self.osu_name = j0["username"]
|
||||||
std.value = j0["pp_raw"]
|
std.value = float(j0["pp_raw"])
|
||||||
taiko.value = j1["pp_raw"]
|
taiko.value = float(j1["pp_raw"])
|
||||||
catch.value = j2["pp_raw"]
|
catch.value = float(j2["pp_raw"])
|
||||||
mania.value = j3["pp_raw"]
|
mania.value = float(j3["pp_raw"])
|
||||||
self.std_pp = std.value
|
self.std_pp = std.value
|
||||||
self.taiko_pp = taiko.value
|
self.taiko_pp = taiko.value
|
||||||
self.catch_pp = catch.value
|
self.catch_pp = catch.value
|
||||||
|
|
|
@ -114,19 +114,19 @@ def osu_pp_change(item, change: typing.Tuple[DirtyDelta, DirtyDelta, DirtyDelta,
|
||||||
try:
|
try:
|
||||||
if std.delta >= 1:
|
if std.delta >= 1:
|
||||||
telegram_bot.send_message(config["Telegram"]["main_group"],
|
telegram_bot.send_message(config["Telegram"]["main_group"],
|
||||||
f"✳️ {item.royal.username} ha ora **{std.value}pp** (+{std.delta}) su osu!",
|
f"✳️ {item.royal.username} ha ora **{int(std.value)}pp** (+{int(std.delta)}) su osu!",
|
||||||
parse_mode="Markdown")
|
parse_mode="Markdown")
|
||||||
if taiko.delta >= 1:
|
if taiko.delta >= 1:
|
||||||
telegram_bot.send_message(config["Telegram"]["main_group"],
|
telegram_bot.send_message(config["Telegram"]["main_group"],
|
||||||
f"✳️ {item.royal.username} ha ora **{taiko.value}pp** (+{taiko.delta}) su osu!taiko!",
|
f"✳️ {item.royal.username} ha ora **{int(taiko.value)}pp** (+{int(taiko.delta)}) su osu!taiko!",
|
||||||
parse_mode="Markdown")
|
parse_mode="Markdown")
|
||||||
if catch.delta >= 1:
|
if catch.delta >= 1:
|
||||||
telegram_bot.send_message(config["Telegram"]["main_group"],
|
telegram_bot.send_message(config["Telegram"]["main_group"],
|
||||||
f"✳️ {item.royal.username} ha ora **{catch.value}pp** (+{catch.delta}) su osu!catch!",
|
f"✳️ {item.royal.username} ha ora **{int(catch.value)}pp** (+{int(catch.delta)}) su osu!catch!",
|
||||||
parse_mode="Markdown")
|
parse_mode="Markdown")
|
||||||
if mania.delta >= 1:
|
if mania.delta >= 1:
|
||||||
telegram_bot.send_message(config["Telegram"]["main_group"],
|
telegram_bot.send_message(config["Telegram"]["main_group"],
|
||||||
f"✳️ {item.royal.username} ha ora **{mania.value}pp** (+{mania.delta}) su osu!mania!",
|
f"✳️ {item.royal.username} ha ora **{int(mania.value)}pp** (+{int(mania.delta)}) su osu!mania!",
|
||||||
parse_mode="Markdown")
|
parse_mode="Markdown")
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.warning(f"Couldn't notify on Telegram: {item}")
|
logger.warning(f"Couldn't notify on Telegram: {item}")
|
||||||
|
|
Loading…
Reference in a new issue