Woops, forgot to put that in the try
This commit is contained in:
parent
d37ab8d91c
commit
8bff707037
|
@ -41,8 +41,8 @@ class Osu(commands.Cog):
|
|||
|
||||
async def get_user_from_api(self, username):
|
||||
"""A simple helper function to parse the list given and handle failures"""
|
||||
user = await self.api.get_user(username)
|
||||
try:
|
||||
user = await self.api.get_user(username)
|
||||
return user[0]
|
||||
except IndexError:
|
||||
return None
|
||||
|
|
Loading…
Reference in a new issue