Skip to content

Commit

Permalink
fix record message
Browse files Browse the repository at this point in the history
  • Loading branch information
Lysquid committed Apr 22, 2024
1 parent 3fccb41 commit d335f68
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cogs/code_golf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("👎")
Expand Down

0 comments on commit d335f68

Please sign in to comment.