Remove invalid starboards
This commit is contained in:
parent
e66b15b2d6
commit
6862c13fe4
1 changed files with 4 additions and 1 deletions
|
@ -132,9 +132,12 @@ class StarboardCog(Scale):
|
||||||
to_delete = []
|
to_delete = []
|
||||||
for starboard in starboards:
|
for starboard in starboards:
|
||||||
c = await ctx.guild.fetch_channel(starboard.channel)
|
c = await ctx.guild.fetch_channel(starboard.channel)
|
||||||
if c:
|
if c and isinstance(c, GuildText):
|
||||||
channel_list.append(c)
|
channel_list.append(c)
|
||||||
else:
|
else:
|
||||||
|
self.logger.warn(
|
||||||
|
f"Starboard {starboard.channel} no longer valid in {ctx.guild.name}"
|
||||||
|
)
|
||||||
to_delete.append(starboard)
|
to_delete.append(starboard)
|
||||||
|
|
||||||
for starboard in to_delete:
|
for starboard in to_delete:
|
||||||
|
|
Loading…
Add table
Reference in a new issue