1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00
This commit is contained in:
Steffo 2015-11-16 22:59:19 +01:00
parent ea8f8cd9d5
commit 35f9daf662
2 changed files with 3 additions and 3 deletions

4
bot.py
View file

@ -64,8 +64,8 @@ while True:
telegram.senddocument('BQADAgADTQIAAh8GgAGj0jKIrpTgvQI', sby)
elif cmd[0].startswith('/osunow'):
print(str(sby) + ": /osunow ")
if cmd[1] is not None:
if cmd[2] is not None:
if len(cmd) >= 2:
if len(cmd) >= 3:
r = osu.getuserrecent(cmd[1], cmd[2])
else:
r = osu.getuserrecent(cmd[1])

2
osu.py
View file

@ -72,4 +72,4 @@ def getuserrecent(user, mode=0):
'm': mode,
}
r = requests.get("https://osu.ppy.sh/api/get_user_recent", params=parametri).json()
return r[0]
return r