aboutsummaryrefslogtreecommitdiff
path: root/discord
diff options
context:
space:
mode:
authorRapptz <[email protected]>2016-01-08 13:29:33 -0500
committerRapptz <[email protected]>2016-01-08 13:31:03 -0500
commit6d5175ad9aee4cf71bb268d062dfb27904390b3b (patch)
tree164d83df5b016c494c279d2ba151b4cfb3a7ea73 /discord
parentdocument public get_ methods and make others private (diff)
downloaddiscord.py-6d5175ad9aee4cf71bb268d062dfb27904390b3b.tar.xz
discord.py-6d5175ad9aee4cf71bb268d062dfb27904390b3b.zip
Document how Client.run should be the last function to call.
Diffstat (limited to 'discord')
-rw-r--r--discord/client.py7
1 files changed, 7 insertions, 0 deletions
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: