Remove invalid starboards

This commit is contained in:
Zeva Rose 2022-04-19 11:55:09 -06:00
parent e66b15b2d6
commit 6862c13fe4

View file

@ -132,9 +132,12 @@ class StarboardCog(Scale):
to_delete = []
for starboard in starboards:
c = await ctx.guild.fetch_channel(starboard.channel)
if c:
if c and isinstance(c, GuildText):
channel_list.append(c)
else:
self.logger.warn(
f"Starboard {starboard.channel} no longer valid in {ctx.guild.name}"
)
to_delete.append(starboard)
for starboard in to_delete: