diff --git a/app/cogs/membership/restriction_listener.py b/app/cogs/membership/restriction_listener.py index 5cb5138..b53ca5a 100644 --- a/app/cogs/membership/restriction_listener.py +++ b/app/cogs/membership/restriction_listener.py @@ -23,7 +23,8 @@ class RestrictionListener(commands.Cog, name='Membership Restriction Listener'): lookup = yaml_load(lookupFile) if not conf[guildStr].get('restrict',False): return if message.author.bot: return - if str(message.channel.category) in categories[guildStr]: return + if message.channel.category is None: return + if str(message.channel.category.id) not in categories[guildStr]: return if (set(message.author.roles) & set([message.guild.get_role(x) for x in conf[guildStr]['roles']['admin']]) or message.author == message.guild.owner): return if set(message.author.roles) & set([message.guild.get_role(x) for x in conf[guildStr]['membership']]): return if message.channel.overwrites_for(message.author).manage_channels: return