Answers for "check the role of user in on_message discord.py"

2

discord.py check if user has role

@bot.command(pass_context=True)
    @commands.has_role("Admin")
    async def unmute(ctx, user: discord.Member):
        role = discord.utils.find(lambda r: r.name == 'Member', ctx.message.server.roles)
        if role in user.roles:
            await bot.say("{} is not muted".format(user))
        else:
            await bot.add_roles(user, role)
Posted by: Guest on January-08-2021
7

discord py get user by id

user = bot.get_user(user_id)
Posted by: Guest on May-21-2020
0

check the role of user in on_message discord.py

Discord
Posted by: Guest on April-10-2021
0

check the role of user in on_message discord.py

503609286367248384
Posted by: Guest on March-12-2021

Code answers related to "check the role of user in on_message discord.py"

Browse Popular Code Answers by Language