Bugfix: membership restriction scanning non-game servers
This commit is contained in:
parent
6ec8613b7f
commit
42cf3afcb4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user