1
0
Fork 0
mirror of synced 2024-09-28 07:21:16 +12:00

Ensured the first result when searching a specifc beatmap

This commit is contained in:
Phxntxm 2016-10-29 22:38:00 -05:00
parent 8826ff768b
commit 58f5d79bd4

View file

@ -49,7 +49,11 @@ class Osu:
"""Gets beatmap info based on the ID provided"""
params = {'b': b_id}
endpoint = 'get_beatmaps'
return await self._request(params, endpoint)
data = await self._request(params, endpoint)
try:
return data[0]
except IndexError:
return None
@commands.group(pass_context=True, invoke_without_command=True)