From b02fcab8236c12e85142ab07d79a07884cb27d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A4ssin=20Aouani?= Date: Mon, 11 Nov 2024 09:16:51 +0100 Subject: [PATCH] add timestamp to results table --- cogs/mogi/calculations.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cogs/mogi/calculations.py b/cogs/mogi/calculations.py index d3f77a2..44d97ab 100644 --- a/cogs/mogi/calculations.py +++ b/cogs/mogi/calculations.py @@ -1,4 +1,5 @@ import math +import time from discord import SlashCommandGroup, ChannelType, Thread, File from discord.ext import commands @@ -95,9 +96,12 @@ async def collect(self, ctx: MogiApplicationContext): return await ctx.respond( "Something has gone seriously wrong, the amount of players and the MMR results don't add up. Use /debug to find the issue and contact a moderator." ) - + # Store the date of the results + ctx.mogi.results_date = time.strftime("%d%m%y") file = File(create_table(ctx.mogi), filename="table.png") - message = await ctx.results_channel.send(content="# Results", file=file) + message = await ctx.results_channel.send( + content=f"# Results - {time.strftime("%d.%m.%y")}", file=file + ) await ctx.respond("Results got posted in the results channel.")