Discord.py client.commands 发送提及的用户

时间:2021-01-13 00:21:17

标签: discord discord.py

我有一个名为 p!slap 的命令,我想要它,这样我的机器人就会说 {message.author} slapped {message.mention} 和一个随机的 gif,但我不知道该怎么做。任何人都可以帮忙吗?谢谢!

@client.command()
async def slap(ctx, message.mention):
  embedVar = discord.embed(title=f"<@{message.author.id}> slapped {message.mention}")
  list = [
          #gif links and stuff
        ]
  await ctx.channel.send(random.choice(list))```

0 个答案:

没有答案