I have code in which you can type -giverole <user> <rolename>
e.g. -giverole @Soup Board of Executives
.
What I need now is a method that checks to see if the user typing the command has a certain role.
I have code that can give a role to someone:
@client.command(pass_context=True)
async def giverole(ctx, member: discord.Member, *, role: discord.Role):
await client.add_roles(member, role)
await client.say("The role '" + str(role) + "' has been given to " + member.mention + " .")
It should do await client.say()
if the user has the right rank. If they don't, then it raises an error message.