Browse Source

Raise an exception when wait_until_ready is called without a loop

pull/10109/head
Rapptz 3 years ago
committed by dolfies
parent
commit
d13b47759b
  1. 5
      discord/client.py

5
discord/client.py

@ -1219,6 +1219,11 @@ class Client:
"""
if self._ready is not MISSING:
await self._ready.wait()
else:
raise RuntimeError(
'Client has not been properly initialised. '
'Please use the login method or asynchronous context manager before calling this method'
)
def wait_for(
self,

Loading…
Cancel
Save