add user discord.py code example
Example 1: add role discord .py
member = message.author
var = discord.utils.get(message.guild.roles, name = "role name")
member.add_role(var)
Example 2: discord.py mention user
#discord.py rewrite
#python 3+
bot.command(name='pingme', help='pings the author of the message')
async def pingme(ctx):
#to get a member from a 'ctx' object is ctx.author
#from there its .mention will mention (ping) the user
#also there are others like .id
await ctx.send(ctx.author.mention)