aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnInternetTroll <lucafulger@gmail.com>2020-05-25 10:26:39 +0000
committerAnInternetTroll <lucafulger@gmail.com>2020-05-25 10:26:39 +0000
commitb0520ffd6af845d663b5fd3e504428f848a7b65c (patch)
tree34d30df059afa194facd8bd8efdfd5e771e37f3e
parentd515335c2d5087e544d91ef30d321137465da77e (diff)
parentf16deca55199f2878ce2f56b5c4095bf633b5741 (diff)
downloadsteve-bot-b0520ffd6af845d663b5fd3e504428f848a7b65c.tar
steve-bot-b0520ffd6af845d663b5fd3e504428f848a7b65c.tar.gz
steve-bot-b0520ffd6af845d663b5fd3e504428f848a7b65c.tar.bz2
steve-bot-b0520ffd6af845d663b5fd3e504428f848a7b65c.tar.lz
steve-bot-b0520ffd6af845d663b5fd3e504428f848a7b65c.tar.xz
steve-bot-b0520ffd6af845d663b5fd3e504428f848a7b65c.tar.zst
steve-bot-b0520ffd6af845d663b5fd3e504428f848a7b65c.zip
Merge branch 'master' of https://github.com/AnInternetTroll/mcbeDiscordBot
Fixes embed stats
-rwxr-xr-xcogs/src.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/cogs/src.py b/cogs/src.py
index 3784ab8..7e6f3fd 100755
--- a/cogs/src.py
+++ b/cogs/src.py
@@ -106,6 +106,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():
@@ -133,9 +134,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(
@@ -143,7 +144,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):