0
votes

I am trying to make the bot wait for a specific role to be removed for it to do an action, the furthest I've reached is making it do an action when the bot roles changed (regardless if its added or removed), however that is not what I want. I am assuming it has to do with the check, which is I am not sure about how to set, here is what I tried:

def check(member, role):
    return role not in member.roles
disable = await bot.wait_for("member_update", check=check)
if disable:
    await ctx.send("Disabled.")

Any help would be appreciated, thanks in advance.

1

1 Answers

2
votes

Your check is incorrect, here is an example that should work:

def check(member, role):
    return role.name == "name of your specific role here"

This will set disable to true only if the name of the role is the same as the specific role provided. You can also use role.id if you prefer.