From 9c76fb7030adb9490a9bd25a8425515c4925f40f Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Wed, 5 Jun 2024 03:00:36 +0100 Subject: [PATCH] Properly map truths --- src/cogs/quote_quota.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cogs/quote_quota.py b/src/cogs/quote_quota.py index 8065e0c..7d9520a 100644 --- a/src/cogs/quote_quota.py +++ b/src/cogs/quote_quota.py @@ -351,7 +351,8 @@ class QuoteQuota(commands.Cog): auth=(username, password), ) response.raise_for_status() - truths = response.json() + 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) await ctx.edit(embed=embed, file=file)