Skip to content

Commit

Permalink
Merge pull request #346 from PyBotDevs/patch-leaderboard-lvls-command
Browse files Browse the repository at this point in the history
Fix issue in `/leaderboard_levels` where bot was unable to fetch user context data from API
  • Loading branch information
notsniped authored Apr 1, 2024
2 parents 66f2a40 + 1d5dee0 commit 872ed84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cogs/levelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async def leaderboard_levels(self, ctx: ApplicationContext):
if y < 10:
try:
if levels_dict[i] != 0:
user_context = await commands.fetch_user(i)
user_context = await ctx.bot.fetch_user(i)
if not user_context.bot and levels_dict[i] != 0:
print(i, levels_dict[i])
if y == 1: yf = ":first_place:"
Expand Down

0 comments on commit 872ed84

Please sign in to comment.