From bc5b0554b872a8d727fc2d0a87183d110f3f1e21 Mon Sep 17 00:00:00 2001 From: Jonas Leder Date: Fri, 3 Apr 2020 09:56:57 +0200 Subject: [PATCH] fixed leaderboard --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index c4f4744..906a3e1 100644 --- a/bot.py +++ b/bot.py @@ -182,7 +182,7 @@ async def leaderboard(ctx): badges = [":first_place: ", ":second_place: ", ":third_place: ", ":four: ", ":five: ", ":six: ", ":seven: ", ":eight: ", ":nine: ", ":keycap_ten: "]#the emoji in front of the username message = ""#in this variable we will prepare in the next step the response for entries in reversed(ranking):#loop through every user in reverse order to get the best first and andd his statistics to message - message = message + badges[len(ranking) - ranking.index(entries) - 1] + ": <@" + str(entries[0]) + "> **Total:** " + str(entries[1]) + " XP (**Text:** " + str(entries[2]) + " + **Reaction:** " + str(entries[3]) + " + **VC:** " + str(entries[4]) + ")\n" + message = message + badges[len(ranking) - ranking.index(entries) - 1] + ": <@" + str(entries[0]) + "> **Total:** " + str(entries[1] + entries[2] + entries[3]) + " XP (**Text:** " + str(entries[1]) + " + **Reaction:** " + str(entries[2]) + " + **VC:** " + str(entries[3]) + ")\n" embed = discord.Embed(title="Leaderboard" , description=message)#make the response Box await ctx.message.channel.send(embed=embed)#print the ressponse box