mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
HO RISOLTO IL BUGGGGG
This commit is contained in:
parent
676a61e9de
commit
ec809416e6
2 changed files with 9 additions and 5 deletions
10
bot.py
10
bot.py
|
@ -62,16 +62,20 @@ while True:
|
|||
elif cmd[0].startswith('/sbam'):
|
||||
print(str(sby) + ": /sbam ")
|
||||
telegram.senddocument('BQADAgADTQIAAh8GgAGj0jKIrpTgvQI', sby)
|
||||
elif cmd[0].startswith('/wololo'):
|
||||
print(str(sby) + ": /wololo ")
|
||||
telegram.senddocument('BQADAgADVAIAAh8GgAHqeZAqbBuFAwI', sby)
|
||||
elif cmd[0].startswith('/osunow'):
|
||||
print(str(sby) + ": /osunow ")
|
||||
if len(cmd) >= 2:
|
||||
# Stavolta ci sono 3 argomenti... forse
|
||||
cmd = msg['text'].split(' ', 2)
|
||||
if len(cmd) >= 3:
|
||||
r = osu.getuserrecent(cmd[1], cmd[2])
|
||||
else:
|
||||
r = osu.getuserrecent(cmd[1])
|
||||
link = "https://osu.ppy.sh/b/" + r['beatmap_id']
|
||||
telegram.sendmessage("[Beatmap " + r['beatmap_id'] + "](" + link + ")\n*" +
|
||||
r['rank'] + "*: " + r['score'] + "\n" +
|
||||
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" +
|
||||
|
|
4
osu.py
4
osu.py
|
@ -72,7 +72,7 @@ def getuserrecent(user, mode=0):
|
|||
'k': apikey,
|
||||
'u': user,
|
||||
'm': mode,
|
||||
'limit': 1,
|
||||
}
|
||||
r = requests.get("https://osu.ppy.sh/api/get_user_recent", params=parametri).json()
|
||||
if len(r) >= 1:
|
||||
return r[0]
|
||||
return r[0]
|
||||
|
|
Loading…
Reference in a new issue