mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 11:48:55 -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 commit dc5cb990cb9632c52f322076c69a0c1568c9eab0. * Revert "[Trivia] Handle potential Discord errors in session." This reverts commit d90e45f9e0188cfeaef914a78eda5f397730a47a. * Handle Discord errors in _error_handler.
This commit is contained in:
parent
36ea867dcf
commit
42edb12b2e
@ -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(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user