#Immunity Roles
1 messages · Page 1 of 1 (latest)
for role in immune_roles:
if role in message_author.roles:
return```
Use set better
You can first check for verified role, then check for the immune role, then? Not sure what you mean by verified, but I'm assuming it's just something all members who want to chat must have
@bot.event
async def on_message(message):
if verified_role in message.author.roles:
for role in immune_roles:
if immune_role in message.author.roles:
#author is immune, can just return
#If this segment is reached, an immune role was not detected and/or the user is not "verified", so do your filter thing
Something like this?