Hello,
i am currently using a self bot and i am making a command that when you run it it should add a role to a user but its not adding the role.
my code:
command 7
role = "399581540717428736"
@client.command(pass_context = True)
async def Blacklist(ctx, *, member : discord.Member = None):
if not ctx.message.author.server_permissions.administrator:
return
if not member:
return await client.say(ctx.message.author.mention + "Specify a user to Blacklist!")
try:
await client.add_roles(user, role)
except Exception as e:
if 'Privilege is too low' in str(e):
return await client.say(":x: Privilege too low!")
embed = discord.Embed(description = "**%s** has been Blacklisted!"%member.name, color = 0xFF0000)
return await client.say(embed = embed)
Hello, i am currently using a self bot and i am making a command that when you run it it should add a role to a user but its not adding the role. my code:
command 7
role = "399581540717428736" @client.command(pass_context = True) async def Blacklist(ctx, *, member : discord.Member = None): if not ctx.message.author.server_permissions.administrator: return