mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 11:48:55 -05:00
Temp fix for stream checker
Should stop errors on startup
This commit is contained in:
parent
e1791f5560
commit
f5a0911693
@ -322,6 +322,8 @@ class Streams:
|
|||||||
stream["ALREADY_ONLINE"] = True
|
stream["ALREADY_ONLINE"] = True
|
||||||
for channel in stream["CHANNELS"]:
|
for channel in stream["CHANNELS"]:
|
||||||
channel_obj = self.bot.get_channel(channel)
|
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
|
can_speak = channel_obj.permissions_for(channel_obj.server.me).send_messages
|
||||||
if channel_obj and can_speak:
|
if channel_obj and can_speak:
|
||||||
await self.bot.send_message(
|
await self.bot.send_message(
|
||||||
@ -339,6 +341,8 @@ class Streams:
|
|||||||
stream["ALREADY_ONLINE"] = True
|
stream["ALREADY_ONLINE"] = True
|
||||||
for channel in stream["CHANNELS"]:
|
for channel in stream["CHANNELS"]:
|
||||||
channel_obj = self.bot.get_channel(channel)
|
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
|
can_speak = channel_obj.permissions_for(channel_obj.server.me).send_messages
|
||||||
if channel_obj and can_speak:
|
if channel_obj and can_speak:
|
||||||
await self.bot.send_message(
|
await self.bot.send_message(
|
||||||
@ -356,6 +360,8 @@ class Streams:
|
|||||||
stream["ALREADY_ONLINE"] = True
|
stream["ALREADY_ONLINE"] = True
|
||||||
for channel in stream["CHANNELS"]:
|
for channel in stream["CHANNELS"]:
|
||||||
channel_obj = self.bot.get_channel(channel)
|
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
|
can_speak = channel_obj.permissions_for(channel_obj.server.me).send_messages
|
||||||
if channel_obj and can_speak:
|
if channel_obj and can_speak:
|
||||||
await self.bot.send_message(
|
await self.bot.send_message(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user