From e9ed52cf16c1c85e6b7a6912993b3ed2701234a3 Mon Sep 17 00:00:00 2001 From: Jakub Kuczys Date: Mon, 1 Apr 2024 03:11:00 +0200 Subject: [PATCH] Fix placement of empty Trivia list check (#6335) --- redbot/cogs/trivia/trivia.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/redbot/cogs/trivia/trivia.py b/redbot/cogs/trivia/trivia.py index 1775dc7a9ac..ea319b06005 100644 --- a/redbot/cogs/trivia/trivia.py +++ b/redbot/cogs/trivia/trivia.py @@ -361,13 +361,14 @@ async def trivia(self, ctx: commands.Context, *categories: str): trivia_dict.pop("DESCRIPTION", None) continue return + trivia_dict.pop("$schema", None) + config = trivia_dict.pop("CONFIG", None) if not trivia_dict: await ctx.send( _("The trivia list was parsed successfully, however it appears to be empty!") ) return settings = await self.config.guild(ctx.guild).all() - config = trivia_dict.pop("CONFIG", None) if config and settings["allow_override"]: settings.update(config) settings["lists"] = dict(zip(categories, reversed(authors)))