When listing channels, deleted channels are shown as well

This commit is contained in:
Elnath 2020-12-29 01:21:48 +01:00
parent 8b19a73fb2
commit ccc438c89e
1 changed files with 1 additions and 2 deletions

View File

@ -142,8 +142,7 @@ class VocalMaisBot(discord.Client):
if channel is not None: # Does the channel still exist? if channel is not None: # Does the channel still exist?
answer_lines.append(f":eyes: {channel.name} ({channel_id})") answer_lines.append(f":eyes: {channel.name} ({channel_id})")
else: else:
# We just ignore non-existing channels answer_lines.append(f":ninja: <deleted channel> ({channel_id})")
pass
await message.channel.send(embed = discord.Embed(title = "I am watching the following channels", description = "\n".join(answer_lines))) await message.channel.send(embed = discord.Embed(title = "I am watching the following channels", description = "\n".join(answer_lines)))
else: else:
await message.channel.send(f":see_no_evil: I am not watching any voice channel! Do not hesitate to add some by running `@{self.user.display_name} register channel_id`") await message.channel.send(f":see_no_evil: I am not watching any voice channel! Do not hesitate to add some by running `@{self.user.display_name} register channel_id`")