From df37b787187477bdc2494259d023fa2852e48b4f Mon Sep 17 00:00:00 2001 From: Phxntxm Date: Thu, 15 Jun 2017 21:30:12 -0500 Subject: [PATCH] Ensure the channel given exists --- cogs/picarto.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cogs/picarto.py b/cogs/picarto.py index 35833d7..7fcb172 100644 --- a/cogs/picarto.py +++ b/cogs/picarto.py @@ -60,6 +60,8 @@ class Picarto: channel_id = self.bot.db.load('server_settings', key=s_id, pluck='notifications_channel') or int(s_id) channel = server.get_channel(channel_id) + if channel is None: + channel = server.default_channel try: await channel.send( "{} has just gone live! View their stream at <{}>".format(member.display_name,