Correct handling of no data returned
This commit is contained in:
parent
9b8e3f3875
commit
a8b48bc718
|
@ -34,8 +34,7 @@ class Picarto:
|
||||||
|
|
||||||
data = await utils.request(url)
|
data = await utils.request(url)
|
||||||
if data is None:
|
if data is None:
|
||||||
await ctx.send("I couldn't connect to Picarto!")
|
return None
|
||||||
return
|
|
||||||
|
|
||||||
# Not everyone has all these settings, so use this as a way to print information if it does, otherwise ignore it
|
# 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']
|
things_to_print = ['comissions', 'adult', 'followers', 'category', 'online']
|
||||||
|
@ -58,7 +57,6 @@ class Picarto:
|
||||||
|
|
||||||
return embed
|
return embed
|
||||||
|
|
||||||
|
|
||||||
def channel_online(self, channel):
|
def channel_online(self, channel):
|
||||||
# Channel is the name we are checking against that
|
# 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)
|
# This creates a list of all users that match this channel name (should only ever be 1)
|
||||||
|
|
Loading…
Reference in a new issue