Ensured the first result when searching a specifc beatmap
This commit is contained in:
parent
8826ff768b
commit
58f5d79bd4
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue