I am trying to mention a user by their name in discord.py. My current code is:
@bot.command(name='mention')
@commands.has_role(OwnerCommands)
async def mention(ctx, *, member: discord.Member):memberid = member.idawait ctx.message.delete()await ctx.send('<@{}>'.format(memberid))
But it does not work. How do I do this?
Edit, I found an answer.