From e0136bce2f20b26b552a2f08ecb55fc2006e068d Mon Sep 17 00:00:00 2001 From: Phxntxm Date: Thu, 6 Apr 2017 17:08:40 -0500 Subject: [PATCH] Catch if a user has no top scores --- cogs/osu.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cogs/osu.py b/cogs/osu.py index 31f4a5e..5a9c278 100644 --- a/cogs/osu.py +++ b/cogs/osu.py @@ -147,6 +147,10 @@ class Osu: scores = await self.api.get_user_best(user.username, limit=limit) entries = [] + if len(entries) == 0: + await ctx.send("Sorry, but I can't find any scores for you {}!".format(member.display_name)) + return + for i in scores: m = await self.api.get_beatmaps(beatmap_id=i.beatmap_id) m = m[0]