From 42cf3afcb45b69a5a20122ba91bde3dacdb91779 Mon Sep 17 00:00:00 2001 From: Vivek Santayana Date: Fri, 21 Jan 2022 21:24:44 +0000 Subject: [PATCH] Bugfix: membership restriction scanning non-game servers --- app/cogs/membership/restriction_listener.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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