mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-24 03:54:20 +00:00
Aggiunta gestione errori nel comando /osu
This commit is contained in:
parent
7c5b50359d
commit
bbd1a076c8
1 changed files with 66 additions and 62 deletions
4
bot.py
4
bot.py
|
@ -228,7 +228,11 @@ while True:
|
||||||
else:
|
else:
|
||||||
# Osu! normale
|
# Osu! normale
|
||||||
mode = 0
|
mode = 0
|
||||||
|
try:
|
||||||
r = osu.getuserrecent(cmd[1], mode)
|
r = osu.getuserrecent(cmd[1], mode)
|
||||||
|
except NameError:
|
||||||
|
telegram.sendmessage(chr(9888) + " Errore nella richiesta ai server di Osu!", sentin)
|
||||||
|
else:
|
||||||
if mode == 0:
|
if mode == 0:
|
||||||
telegram.sendmessage("*Osu!*\n"
|
telegram.sendmessage("*Osu!*\n"
|
||||||
"[Beatmap " + r['beatmap_id'] + "](" + 'https://osu.ppy.sh/b/' + r[
|
"[Beatmap " + r['beatmap_id'] + "](" + 'https://osu.ppy.sh/b/' + r[
|
||||||
|
|
Loading…
Reference in a new issue