From 6d5175ad9aee4cf71bb268d062dfb27904390b3b Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 8 Jan 2016 13:29:33 -0500 Subject: Document how Client.run should be the last function to call. --- discord/client.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'discord') diff --git a/discord/client.py b/discord/client.py index 5c979128..4c06dcbf 100644 --- a/discord/client.py +++ b/discord/client.py @@ -759,7 +759,14 @@ class Client: # cancel all tasks lingering finally: loop.close() + + Warning + -------- + This function must be the last function to call due to the fact that it + is blocking. That means that registration of events or anything being + called after this function call will not execute until it returns. """ + try: self.loop.run_until_complete(self.start(email, password)) except KeyboardInterrupt: -- cgit v1.2.3