From 0c1d78327e6d81aeb82a5627d1f834be93c8e977 Mon Sep 17 00:00:00 2001 From: SowinskiBraeden Date: Sun, 17 Nov 2024 20:41:13 -0800 Subject: [PATCH] better leaderboard embed --- src/ReforgerStatsBot.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ReforgerStatsBot.py b/src/ReforgerStatsBot.py index 5705759..fc2ddf3 100644 --- a/src/ReforgerStatsBot.py +++ b/src/ReforgerStatsBot.py @@ -51,16 +51,15 @@ class ReforgerStats(commands.Bot): async def createLeaderboardEmbed(self, players: list[dict]) -> dict: sorted_players = sorted(players, key=lambda a: a["kills"], reverse=True) - current: int = round(time()) - description = f"From to " + description = f"-# from to \n" rank = 1 for player in sorted_players: - description += f"> **{rank}.** {player['gamertag']}\n`{player['KDR']}` KDR - `{player['kills']}` Kill{'s' if player['kills'] > 1 or player['kills'] == 0 else ''} `{player['deaths']}` Death{'s' if player['deaths'] > 1 or player['deaths'] == 0 else ''}\n" + description += f"**{rank}. {player['gamertag']}**{player['KDR']} KDR - {player['kills']} Kill{'s' if player['kills'] > 1 or player['kills'] == 0 else ''} - {player['deaths']} Death{'s' if player['deaths'] > 1 or player['deaths'] == 0 else ''}\n" rank += 1 return { "embeds": [{ - "title": "Leaderboard", + "title": f"Leaderboard", "description": description }] }