We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7137ee commit a83ddf4Copy full SHA for a83ddf4
interactions/client/bot.py
@@ -1,6 +1,6 @@
1
import re
2
import sys
3
-from asyncio import get_event_loop, iscoroutinefunction
+from asyncio import CancelledError, get_event_loop, iscoroutinefunction
4
from functools import wraps
5
from importlib import import_module
6
from importlib.util import resolve_name
@@ -135,7 +135,10 @@ def latency(self) -> float:
135
136
def start(self) -> None:
137
"""Starts the client session."""
138
- self._loop.run_until_complete(self._ready())
+ try:
139
+ self._loop.run_until_complete(self._ready())
140
+ except (CancelledError, Exception) as e:
141
+ raise e from e
142
143
def __register_events(self) -> None:
144
"""Registers all raw gateway events to the known events."""
0 commit comments