mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-07 18:02:31 -05:00
[Trivia] Handle potential Discord errors in session (#5172)
* [Trivia] Handle potential Discord errors in session. * Hm why did I put HTTPException in there * Revert "Hm why did I put HTTPException in there" This reverts commitdc5cb990cb. * Revert "[Trivia] Handle potential Discord errors in session." This reverts commitd90e45f9e0. * Handle Discord errors in _error_handler.
This commit is contained in:
@@ -114,6 +114,8 @@ class TriviaSession:
|
|||||||
fut.result()
|
fut.result()
|
||||||
except asyncio.CancelledError:
|
except asyncio.CancelledError:
|
||||||
pass
|
pass
|
||||||
|
except (discord.NotFound, discord.Forbidden):
|
||||||
|
self.stop()
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
LOG.error("A trivia session has encountered an error.\n", exc_info=exc)
|
LOG.error("A trivia session has encountered an error.\n", exc_info=exc)
|
||||||
asyncio.create_task(
|
asyncio.create_task(
|
||||||
|
|||||||
Reference in New Issue
Block a user