1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00

diviso le 4 modalità di /osunow

This commit is contained in:
Steffo 2015-11-24 16:01:50 +01:00
parent afb39df2a7
commit 7e17bb9220

56
bot.py
View file

@ -60,7 +60,8 @@ while True:
else:
telegram.sendmessage(chr(9888) +
' Non hai specificato un gioco!' +
'[Visualizza tutto](https://isthereanydeal.com/#/search:.;/scroll:%23gamelist).', sby)
'[Visualizza tutto](https://isthereanydeal.com/#/search:.;/scroll:%23gamelist).',
sby)
elif cmd[0].startswith('/rage'):
if len(rage) <= 0:
# Elenco degli audio disponibili
@ -89,16 +90,51 @@ while True:
if len(cmd) >= 2:
cmd = msg['text'].split(' ', 2)
if len(cmd) >= 3:
r = osu.getuserrecent(cmd[1], cmd[2])
mode = int(cmd[2])
else:
r = osu.getuserrecent(cmd[1])
telegram.sendmessage("[Beatmap " + r['beatmap_id'] + "](" + 'https://osu.ppy.sh/b/' + r['beatmap_id'] +
")\n*" + r['rank'] + "*\n*Punti*: " + r['score'] + "\n" +
"*Combo* x" + r['maxcombo'] + "\n" +
"*300*: " + r['count300'] + "\n" +
"*100*: " + r['count100'] + "\n" +
"*50*: " + r['count50'] + "\n" +
"*Miss*: " + r['countmiss'], sby)
mode = 0
r = osu.getuserrecent(cmd[1], mode)
if mode == 0:
telegram.sendmessage("*Osu!*\n" +
"[Beatmap " + r['beatmap_id'] + "](" + 'https://osu.ppy.sh/b/' + r['beatmap_id'] +
")\n*" + r['rank'] + "*\n*Punti*: " + r['score'] + "\n" +
"*Combo* x" + r['maxcombo'] + "\n" +
"*300*: " + r['count300'] + "\n" +
"*100*: " + r['count100'] + "\n" +
"*50*: " + r['count50'] + "\n" +
"*Awesome*: " + r['countkatu'] + "\n" +
"*Good*: " + r['countgeki'] + "\n" +
"*Miss*: " + r['countmiss'], sby)
elif mode == 1:
telegram.sendmessage("*Taiko*\n" +
"[Beatmap " + r['beatmap_id'] + "](" + 'https://osu.ppy.sh/b/' + r['beatmap_id'] +
")\n*" + r['rank'] + "*\n*Punti*: " + r['score'] + "\n" +
"*Combo* x" + r['maxcombo'] + "\n" +
"*Great*: " + r['count300'] + "\n" +
"*Good*: " + r['count100'] + "\n" +
"_Large_ *Great*: " + r['countkatu'] + "\n" +
"_Large_ *Good*: " + r['countgeki'] + "\n" +
"*Bad*: " + r['countmiss'], sby)
elif mode == 2:
telegram.sendmessage("*Catch the Beat*\n" +
"[Beatmap " + r['beatmap_id'] + "](" + 'https://osu.ppy.sh/b/' + r['beatmap_id'] +
")\n*" + r['rank'] + "*\n*Punti*: " + r['score'] + "\n" +
"*Combo* x" + r['maxcombo'] + "\n" +
"*Fruit*: " + r['count300'] + "\n" +
"*Droplet* _tick_: " + r['count100'] + "\n" +
"*Droplet* _trail_: " + r['count50'] + "\n" +
"*Miss*: " + r['countmiss'], sby)
elif mode == 3:
telegram.sendmessage("*Osu!mania*\n" +
"[Beatmap " + r['beatmap_id'] + "](" + 'https://osu.ppy.sh/b/' + r['beatmap_id'] +
")\n*" + r['rank'] + "*\n*Punti*: " + r['score'] + "\n" +
"*Combo* x" + r['maxcombo'] + "\n" +
"_Rainbow_ *300*: " + r['countgeki'] + "\n" +
"*300*: " + r['count300'] + "\n" +
"*100*: " + r['count100'] + "\n" +
"*200*: " + r['countkatu'] + "\n" +
"*50*: " + r['count50'] + "\n" +
"*Miss*: " + r['countmiss'], sby)
else:
# In futuro, il nome utente deve trovarlo da solo in base all'username di provenienza.
telegram.sendmessage(chr(9888) + " Non hai specificato un nome utente!", sby)