diff options
| author | 2021-12-28 00:31:47 -0500 | |
|---|---|---|
| committer | 2022-02-09 18:13:37 -0500 | |
| commit | e9f65c805ca16cdc1bfb2e13f6a6c91d9f511480 (patch) | |
| tree | ba760aed76fded13a84746d11d23f0c213a609ea | |
| parent | fix \ with if (diff) | |
display error when something goes wrong with .trivianight load
| -rw-r--r-- | bot/exts/events/trivianight/trivianight.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/exts/events/trivianight/trivianight.py b/bot/exts/events/trivianight/trivianight.py index 0971ea2a..aa6b8967 100644 --- a/bot/exts/events/trivianight/trivianight.py +++ b/bot/exts/events/trivianight/trivianight.py @@ -90,8 +90,8 @@ class TriviaNightCog(commands.Cog): try: serialized_json = loads(json_text) - except JSONDecodeError: - raise commands.BadArgument("Invalid JSON") + except JSONDecodeError as error: + raise commands.BadArgument(f"Looks like something went wrong:\n{str(error)}") self.game = TriviaNightGame(serialized_json) self.question_closed = asyncio.Event() |