mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 17:02:32 -05:00
* [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. (cherry picked from commit42edb12b2e) Co-authored-by: PredaaA <46051820+PredaaA@users.noreply.github.com> Co-authored-by: PredaaA <46051820+PredaaA@users.noreply.github.com>
This commit is contained in:
@@ -114,6 +114,8 @@ class TriviaSession:
|
||||
fut.result()
|
||||
except asyncio.CancelledError:
|
||||
pass
|
||||
except (discord.NotFound, discord.Forbidden):
|
||||
self.stop()
|
||||
except Exception as exc:
|
||||
LOG.error("A trivia session has encountered an error.\n", exc_info=exc)
|
||||
asyncio.create_task(
|
||||
|
||||
Reference in New Issue
Block a user