From f5a09116935a051b111d10837806d61aad1de005 Mon Sep 17 00:00:00 2001 From: Twentysix Date: Sun, 3 Jul 2016 01:31:24 +0200 Subject: [PATCH] Temp fix for stream checker Should stop errors on startup --- cogs/streams.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cogs/streams.py b/cogs/streams.py index c56ad2e3e..968c4e89e 100644 --- a/cogs/streams.py +++ b/cogs/streams.py @@ -322,6 +322,8 @@ class Streams: stream["ALREADY_ONLINE"] = True for channel in stream["CHANNELS"]: channel_obj = self.bot.get_channel(channel) + if channel_obj is None: + continue can_speak = channel_obj.permissions_for(channel_obj.server.me).send_messages if channel_obj and can_speak: await self.bot.send_message( @@ -339,6 +341,8 @@ class Streams: stream["ALREADY_ONLINE"] = True for channel in stream["CHANNELS"]: channel_obj = self.bot.get_channel(channel) + if channel_obj is None: + continue can_speak = channel_obj.permissions_for(channel_obj.server.me).send_messages if channel_obj and can_speak: await self.bot.send_message( @@ -356,6 +360,8 @@ class Streams: stream["ALREADY_ONLINE"] = True for channel in stream["CHANNELS"]: channel_obj = self.bot.get_channel(channel) + if channel_obj is None: + continue can_speak = channel_obj.permissions_for(channel_obj.server.me).send_messages if channel_obj and can_speak: await self.bot.send_message(