如何获取catch标记的用户名作为回复。当我们标记它们的示例?hello @Steve
时,下面的代码将Dm发送给用户
@bot.command(pass_context=True)
async def hello(ctx, member: discord.Member):
await bot.send_message(member, "Hi (username) how are you.")
机器人回复的Hi Steve how are you.
检查User示例:
await bot.send_message(member, "Hi {} I love ya.".format(member.name))