From bfac390864da3ad90c54f0bf164e95c1ccd3e481 Mon Sep 17 00:00:00 2001 From: Thomas Voss <57815710+Mango0x45@users.noreply.github.com> Date: Mon, 25 May 2020 11:23:30 +0200 Subject: Fixed typos and embed title bug --- cogs/src.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cogs') diff --git a/cogs/src.py b/cogs/src.py index 4971115..0d7a6d1 100755 --- a/cogs/src.py +++ b/cogs/src.py @@ -107,6 +107,7 @@ async def pendingRuns(self, ctx): for game in range(2): for i in range(200): + leaderboard = '' # A little ugly but prevents name not defined error level = False try: for key, value in runs['data'][i].items(): @@ -132,9 +133,9 @@ async def pendingRuns(self, ctx): except Exception as e: print(e.args) break - if game == 0: + if game == 0 and leaderboard != 'Individual Level Run': leaderboard = "Full Game Run" - elif game == 1: + elif game == 1 and leaderboard != 'Individual Level Run': leaderboard = "Category Extension Run" mcbece_runs += 1 embed = discord.Embed( @@ -142,7 +143,7 @@ async def pendingRuns(self, ctx): await self.bot.get_channel(699713639866957905).send(embed=embed) runs = runs2 gameID = gameID2 - embed_stats = discord.Embed(title='Pendng Run Stats', description=f"Full Game Runs: {mcbe_runs}\nIndividual Level Runs: {mcbeil_runs}\nCategory Extension Runs: {mcbece_runs}", color=16711680 + i * 60) + embed_stats = discord.Embed(title='Pending Run Stats', description=f"Full Game Runs: {mcbe_runs}\nIndividual Level Runs: {mcbeil_runs}\nCategory Extension Runs: {mcbece_runs}", color=16711680 + i * 60) await self.bot.get_channel(699713639866957905).send(embed=embed_stats) class Src(commands.Cog): -- cgit v1.2.3