Catch channels that return None (#224)

This commit is contained in:
Kowlin
2021-04-06 19:45:22 +02:00
committed by GitHub
parent 12b5fff4d8
commit 226e1ff43e

View File

@@ -52,6 +52,8 @@ class AntiPhoneClapper(commands.Cog):
msg = "Bad gifs will be removed in:\n"
for channel in channel_list:
channel_obj = self.bot.get_channel(channel)
if channel_obj is None: # Catch deleted/unexisting channels
continue
msg += f"{channel_obj.mention}\n"
await ctx.send(msg)