From a8b48bc718a9feefdcb0b572dff8c2442ed629e5 Mon Sep 17 00:00:00 2001 From: phxntxm Date: Tue, 27 Jun 2017 19:12:29 -0500 Subject: [PATCH] Correct handling of no data returned --- cogs/picarto.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cogs/picarto.py b/cogs/picarto.py index 9632b6f..a150ac5 100644 --- a/cogs/picarto.py +++ b/cogs/picarto.py @@ -34,8 +34,7 @@ class Picarto: data = await utils.request(url) if data is None: - await ctx.send("I couldn't connect to Picarto!") - return + return None # Not everyone has all these settings, so use this as a way to print information if it does, otherwise ignore it things_to_print = ['comissions', 'adult', 'followers', 'category', 'online'] @@ -58,7 +57,6 @@ class Picarto: return embed - def channel_online(self, channel): # Channel is the name we are checking against that # This creates a list of all users that match this channel name (should only ever be 1)