Properly map truths
All checks were successful
Build and Publish college-bot-v2 / build_and_publish (push) Successful in 14s

This commit is contained in:
Nexus 2024-06-05 03:00:36 +01:00
parent c47a38bfb9
commit 9c76fb7030
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -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)