From d335f6886ca9add88ff978cece406a021a94fc14 Mon Sep 17 00:00:00 2001 From: Lysquid Date: Mon, 22 Apr 2024 18:21:42 +0200 Subject: [PATCH] fix record message --- cogs/code_golf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cogs/code_golf.py b/cogs/code_golf.py index f50318a..f315d5f 100644 --- a/cogs/code_golf.py +++ b/cogs/code_golf.py @@ -84,10 +84,10 @@ async def submit(self, ctx: cmds.Context, challenge: challenge, attachment: disc # Overwrite previous submissions previous_files = tuple(challenge_path.glob(f"{name}.*")) if previous_files: - best_size = min(file.stat().st_size for file in previous_files) - if best_size < size: + previous_size = min(file.stat().st_size for file in previous_files) + if previous_size < size: message = await ctx.send( - f"Your previous submission is better: {best_size} bytes < {size} bytes\n" + f"Your previous submission is better: {previous_size} bytes < {size} bytes\n" "Are you sure you want to replace it? <:chokbar:1224778687375741051>") await message.add_reaction("👍") await message.add_reaction("👎")