From d13b47759b58bf631ef6f9317ec997487f598bb6 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sat, 11 Jun 2022 20:29:30 -0400 Subject: [PATCH] Raise an exception when wait_until_ready is called without a loop --- discord/client.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/discord/client.py b/discord/client.py index 64025e64e..38f125576 100644 --- a/discord/client.py +++ b/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,