Describe the bug
leaderboard doesn't sort users correctly
You're on the level 3 (#2) and you have 608 XP!
Top 1: someone №1
Top 2: someone №2
Top 3: someone else
while should be:
Top 1: someone №1
Top 2: TheRjavisDev
Top 3: someone else
To Reproduce
Minimal code to reproduce the bug/error
data = await lvl.each_member_data(ctx.guild,sort_by='rank')
if data[1].name and data[2].name and data[3].name:
await ctx.respond(f"Top 1: {data[1].name} ({data[1].level})\nTop 2: {data[2].name} ({data[2].level})\nTop 3: {data[3].name} ({data[3].level})")
else:
await ctx.respond("Not enough members to display leaderboard!")
Traceback if any
N/A
Required Checklist
[ ] I am using discord.py 2.0 or higher (actually running pycord)
[x] I am using discordLevelingSystem 1.2.0 or higher
Using sort_by='rank' works as expected when testing the code. This library operates under discord.py so I assume using pycord could be causing the issue.. There is no sort by total_xp, only by xp
Describe the bug leaderboard doesn't sort users correctly
You're on the level 3 (#2) and you have 608 XP!
Top 1: someone №1 Top 2: someone №2 Top 3: someone else
while should be:
Top 1: someone №1 Top 2: TheRjavisDev Top 3: someone else
To Reproduce Minimal code to reproduce the bug/error
Traceback if any
Required Checklist
Version Info What's the exact version of discordLevelingSystem/pycord are you using?
I'm not sure is it a pycord or discordlevelingsystem issue, so you can close it if it's invalid
one more thing: total_xp is not being accepted by sort_by