Skip to content

Commit

Permalink
🐛 fix(xp): configuration bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ascpial authored and Aeris1One committed Aug 30, 2023
1 parent 6a2493f commit a8cc86e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/xp/xp.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ async def _create_config(
roles = await self.rr_list_role(ctx.guild.id)
sorted_dict = {}
for role in roles:
if role := ctx.guild.get_role(role["role"]):
if discord_role := ctx.guild.get_role(role["role"]):
if role["level"] in sorted_dict:
sorted_dict[role["level"]].append(role)
sorted_dict[role["level"]].append(discord_role)
else:
sorted_dict[role["level"]] = [role]
sorted_dict[role["level"]] = [discord_role]
if len(sorted_dict) == 0:
return []
_lvl = await self.bot._(ctx.guild.id, "xp.card.level")
Expand Down

0 comments on commit a8cc86e

Please sign in to comment.