From af9e5bc67a189096663a694cd99484e14877d1d7 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Thu, 26 Nov 2015 19:30:09 -0500 Subject: 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. --- examples/echo.py | 8 -------- 1 file changed, 8 deletions(-) (limited to 'examples/echo.py') 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!') -- cgit v1.2.3