From f01c9797f7151aa3d7a8fc9b1e8ec1a9c580fb33 Mon Sep 17 00:00:00 2001 From: CMDR furrycat Date: Mon, 20 Feb 2017 11:13:03 +0000 Subject: [PATCH] Check name of voice channels correctly. --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index d2c74f2..3bbc26c 100644 --- a/bot.py +++ b/bot.py @@ -140,7 +140,7 @@ def parse_channel(text, *, text_ok = True, voice_ok = True): name = text for channel in client.get_all_channels(): # Note that text channels are all lowercase; voice channels are title case. - if channel.name.lower() == name: + if channel.name.lower() == name.lower(): log.debug('Channel {} has ID {} on server {}.'.format(channel.name, channel.id, channel.server.id)) if not text_ok and channel.type != discord.ChannelType.voice: log.warning('Parsed channel {} of wrong type!'.format(channel_id)) -- 2.7.4