From 9dfdf0287a3ede9c21e3f15c54c8abeb7f974ac4 Mon Sep 17 00:00:00 2001 From: Myned Date: Tue, 16 Aug 2022 13:59:27 -0500 Subject: [PATCH] Fix enforcing activity for excluded role --- tasks/activity.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tasks/activity.py b/tasks/activity.py index 54f6fcc..26a8e64 100644 --- a/tasks/activity.py +++ b/tasks/activity.py @@ -20,6 +20,11 @@ async def check_activity(): c.config["guild"], author_id ) or await plugin.bot.rest.fetch_member(c.config["guild"], author_id) + # Delete member from db if it has excluded role + if c.config["exclude"] and c.config["exclude"] in member.role_ids: + del c.db[author_id] + continue + # Enforce activity roles if c.config["active"] and c.config["active"] in member.role_ids: await member.remove_role(c.config["active"])