From c3940daa9666d6b6f19d56515ceaed69f47a0a3f Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Wed, 5 Jun 2024 03:02:50 +0100 Subject: [PATCH] Properly map truths, again --- src/cogs/quote_quota.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/cogs/quote_quota.py b/src/cogs/quote_quota.py index 7d9520a..c7e1ade 100644 --- a/src/cogs/quote_quota.py +++ b/src/cogs/quote_quota.py @@ -284,13 +284,12 @@ class QuoteQuota(commands.Cog): async def _process_all_messages( self, - channel: discord.TextChannel, - truths: list + truths: list[TruthPayload] ) -> tuple[discord.Embed, discord.File]: """ Processes all the messages in the given channel. - :param channel: The channel to process + :param truths: The truths to process :returns: The stats """ embed = discord.Embed(title="Truth Counts", color=discord.Color.blurple(), timestamp=discord.utils.utcnow()) @@ -353,7 +352,7 @@ class QuoteQuota(commands.Cog): response.raise_for_status() truths: list[dict] = response.json() truths: list[TruthPayload] = list(map(lambda t: TruthPayload.model_validate(t), truths)) - embed, file = await self._process_all_messages(channel, truths) + embed, file = await self._process_all_messages(truths) await ctx.edit(embed=embed, file=file)