Skip to content

Commit

Permalink
Fix placement of empty Trivia list check (#6335)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackenmen authored Apr 1, 2024
1 parent 194dea5 commit e9ed52c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion redbot/cogs/trivia/trivia.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit e9ed52c

Please sign in to comment.