1
Fork 0
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:
Steffo 2016-01-26 19:04:56 +01:00
parent 7c5b50359d
commit bbd1a076c8

4
bot.py
View file

@ -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[