Skip to content

Commit

Permalink
add timestamp to results table
Browse files Browse the repository at this point in the history
  • Loading branch information
probablyjassin committed Nov 11, 2024
1 parent 81610fc commit b02fcab
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cogs/mogi/calculations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import math
import time

from discord import SlashCommandGroup, ChannelType, Thread, File
from discord.ext import commands
Expand Down Expand Up @@ -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.")

Expand Down

0 comments on commit b02fcab

Please sign in to comment.