diff options
author | 2019-04-21 20:03:18 +1000 | |
---|---|---|
committer | 2019-04-21 20:03:18 +1000 | |
commit | 64d555ddee02481cac6fee07262d8c7d789fa5fd (patch) | |
tree | 276547b0c170a27e086ab9d9cb0ea37214f5cf88 | |
parent | Ensure super egg drops. (diff) |
Fix rank command.
-rw-r--r-- | bot/seasons/easter/egg_hunt/cog.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bot/seasons/easter/egg_hunt/cog.py b/bot/seasons/easter/egg_hunt/cog.py index 56d4e71d..5120497b 100644 --- a/bot/seasons/easter/egg_hunt/cog.py +++ b/bot/seasons/easter/egg_hunt/cog.py @@ -482,8 +482,9 @@ class EggHunt(commands.Cog): db = sqlite3.connect(DB_PATH) c = db.cursor() c.execute( - f"SELECT RANK() OVER(ORDER BY score DESC) AS rank FROM user_scores " - f"WHERE user_id={member.id}" + "SELECT rank FROM " + "(SELECT RANK() OVER(ORDER BY score DESC) AS rank, user_id FROM user_scores)" + f"WHERE user_id = {member.id};" ) result = c.fetchone() db.close() |