diff options
| author | Rapptz <[email protected]> | 2015-11-26 19:30:09 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2015-11-26 19:30:09 -0500 |
| commit | af9e5bc67a189096663a694cd99484e14877d1d7 (patch) | |
| tree | 70f5b318751ca31ae948b5259386a6288f3c272a /examples/echo.py | |
| parent | Add Client.get_invite to turn a URL to an Invite object. (diff) | |
| download | discord.py-af9e5bc67a189096663a694cd99484e14877d1d7.tar.xz discord.py-af9e5bc67a189096663a694cd99484e14877d1d7.zip | |
Simplify examples to no longer use logging or Client.is_logged_in
The logging module is no longer required to get diagnostic output
since we use `stderr` by default regardless of the logging module.
Which means that the logging module will only give a more verbose
output than is necessary.
Client.is_logged_in checking is no longer necessary since all HTTP
request handling now raise an exception if they fail so those chunks
are also gone.
Diffstat (limited to 'examples/echo.py')
| -rw-r--r-- | examples/echo.py | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/examples/echo.py b/examples/echo.py index 21908533..ce5eef90 100644 --- a/examples/echo.py +++ b/examples/echo.py @@ -1,16 +1,8 @@ import discord -import logging - -# Set up the logging module to output diagnostic to the console. -logging.basicConfig() client = discord.Client() client.login('email', 'password') -if not client.is_logged_in: - print('Logging in to Discord failed') - exit(1) - @client.event def on_ready(): print('Connected!') |