diff options
| author | Rapptz <[email protected]> | 2016-01-08 13:29:33 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2016-01-08 13:31:03 -0500 |
| commit | 6d5175ad9aee4cf71bb268d062dfb27904390b3b (patch) | |
| tree | 164d83df5b016c494c279d2ba151b4cfb3a7ea73 /docs | |
| parent | document public get_ methods and make others private (diff) | |
| download | discord.py-6d5175ad9aee4cf71bb268d062dfb27904390b3b.tar.xz discord.py-6d5175ad9aee4cf71bb268d062dfb27904390b3b.zip | |
Document how Client.run should be the last function to call.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/migrating.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/migrating.rst b/docs/migrating.rst index caf15d67..2cfa2bc6 100644 --- a/docs/migrating.rst +++ b/docs/migrating.rst @@ -262,6 +262,13 @@ After: client.run('email', 'password') +.. warning:: + + Like in the older ``Client.run`` function, the newer one must be the one of + the last functions to call. This is because the function is **blocking**. Registering + events or doing anything after :meth:`Client.run` will not execute until the function + returns. + This is a utility function that abstracts the event loop for you. There's no need for the run call to be blocking and out of your control. Indeed, if you want control of the event loop then doing so is quite straightforward: |