how to dm user discord.py code example
Example 1: discord.py dm specific user
if message.content == "dm":
await message.channel.send("Dming user")
dm = await message.author.create_dm()
await dm.send("What you want to send")
Example 2: discord.py mention user
bot.command(name='pingme', help='pings the author of the message')
async def pingme(ctx):
await ctx.send(ctx.author.mention)
Example 3: how to mention someone discord.py
myid = '<@201909896357216256>'
await client.send_message(message.channel, ' : %s is the best ' % myid)