Fixed lb to not give infinite loops

This commit is contained in:
2023-05-19 19:05:12 +02:00
parent 58be8948a4
commit acbae19ec1
2 changed files with 25 additions and 6 deletions
+6 -1
View File
@@ -121,8 +121,13 @@ class SlashLeaderboard(commands.Cog):
else:
hardfilter = True
if(len(players) < 10):
lb_length = len(players)
else:
lb_length = 10
top10 = {}
while(len(top10)<10):
while(len(top10)<lb_length):
current = 0
name = ""
for p in players: