diff --git a/cogs/picarto.py b/cogs/picarto.py index 9f4fbe2..6eab420 100644 --- a/cogs/picarto.py +++ b/cogs/picarto.py @@ -97,7 +97,7 @@ class Picarto: server_alerts = await utils.get_content('server_alerts', {'server_id': server_id}) try: channel_id = server_alerts[0]['channel_id'] - except IndexError: + except (IndexError, TypeError): channel_id = server_id channel = self.bot.get_channel(channel_id) # Get the member that has just gone live diff --git a/cogs/twitch.py b/cogs/twitch.py index 1f2446b..24a9275 100644 --- a/cogs/twitch.py +++ b/cogs/twitch.py @@ -89,7 +89,7 @@ class Twitch: continue server_alerts = await utils.get_content('server_alerts', {'server_id': server_id}) channel_id = server_id - if len(server_alerts) > 0: + if server_alerts is not None and len(server_alerts) > 0: channel_id = server_alerts[0].get('channel_id') channel = self.bot.get_channel(channel_id) # Get the member that has just gone live