mirror of
https://github.com/myned/watcher.git
synced 2024-11-01 12:22:38 +00:00
Fix enforcing activity for excluded role
This commit is contained in:
parent
a2327b32f6
commit
9dfdf0287a
1 changed files with 5 additions and 0 deletions
|
@ -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"])
|
||||
|
|
Loading…
Reference in a new issue