1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 21:44:21 +00:00
This commit is contained in:
Steffo 2019-01-23 15:10:31 +01:00
parent 9908e392c4
commit 09c17829a3

View file

@ -112,19 +112,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.value.delta}) su osu!", f"✳️ {item.royal.username} ha ora **{std.value}pp** (+{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 **{std.value}pp** (+{std.value.delta}) su osu!taiko!", f"✳️ {item.royal.username} ha ora **{taiko.value}pp** (+{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 **{std.value}pp** (+{std.value.delta}) su osu!catch!", f"✳️ {item.royal.username} ha ora **{catch.value}pp** (+{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 **{std.value}pp** (+{std.value.delta}) su osu!mania!", f"✳️ {item.royal.username} ha ora **{mania.value}pp** (+{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}")