Answers for "how to apply role to discord member discord.py rewrite"

1

how to delete role discord py rewrite

@client.command(name="delete_role", pass_context=True)
async def delete_role(ctx, role_name):
    #find role object
    role_object = discord.utils.get(ctx.message.guild.roles, name=role_name)
    #delete role
    await role_object.delete()
Posted by: Guest on July-07-2020
3

how to change role permissions in discord.py

#edit permissions of role
permissions = discord.Permissions()
permissions.update(kick_members = False)
await role.edit(reason = None, colour = discord.Colour.blue(), permissions=permissions)
Posted by: Guest on November-25-2020

Code answers related to "how to apply role to discord member discord.py rewrite"

Python Answers by Framework

Browse Popular Code Answers by Language