无法让 discord bot 提及作者(python)

时间:2021-07-04 17:14:43

标签: python discord discord.py

@client.event
async def on_message(message):
  if message.author == client.user:
      return

  if message.content.startswith('!play'):
      await message.channel.send('{author.mention} wants to play a game, would you like to play? @here')

我是新手,所以请解释我做错了什么。

1 个答案:

答案 0 :(得分:0)

试试看:

  if message.content.startswith('!play'):
      await message.channel.send(f'{message.author.mention} wants to play a game, would you like to play? @here')
相关问题