mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
asdfd
This commit is contained in:
parent
49602edc64
commit
676a61e9de
2 changed files with 9 additions and 8 deletions
14
bot.py
14
bot.py
|
@ -69,14 +69,14 @@ while True:
|
|||
r = osu.getuserrecent(cmd[1], cmd[2])
|
||||
else:
|
||||
r = osu.getuserrecent(cmd[1])
|
||||
link = "https://osu.ppy.sh/s/" + r['beatmap_id']
|
||||
telegram.sendmessage("[Beatmap](" + link + ")\n*" +
|
||||
link = "https://osu.ppy.sh/b/" + r['beatmap_id']
|
||||
telegram.sendmessage("[Beatmap " + r['beatmap_id'] + "](" + link + ")\n*" +
|
||||
r['rank'] + "*: " + r['score'] + "\n" +
|
||||
"Combo x" + r['max_combo'] + "\n" +
|
||||
"300: " + r['count300'] + "\n" +
|
||||
"100: " + r['count100'] + "\n" +
|
||||
"50: " + r['count50'] + "\n" +
|
||||
"Miss: " + r['countmiss'], sby)
|
||||
"*Combo* x" + r['maxcombo'] + "\n" +
|
||||
"*300*: " + r['count300'] + "\n" +
|
||||
"*100*: " + r['count100'] + "\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)
|
||||
|
|
3
osu.py
3
osu.py
|
@ -74,4 +74,5 @@ def getuserrecent(user, mode=0):
|
|||
'm': mode,
|
||||
}
|
||||
r = requests.get("https://osu.ppy.sh/api/get_user_recent", params=parametri).json()
|
||||
return r[0]
|
||||
if len(r) >= 1:
|
||||
return r[0]
|
||||
|
|
Loading…
Reference in a new issue