Check name of voice channels correctly.
authorCMDR furrycat <elite@furrycat.net>
Mon, 20 Feb 2017 11:13:03 +0000 (11:13 +0000)
committerCMDR furrycat <elite@furrycat.net>
Mon, 20 Feb 2017 11:13:03 +0000 (11:13 +0000)
bot.py

diff --git a/bot.py b/bot.py
index d2c74f2..3bbc26c 100644 (file)
--- 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))