Can’t get discord bot to mention author (python) – Code Utility

[

@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')

I’m new to this, so please explain what I did wrong.

,

try it:

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

,

@client.command()
async def play(ctx):
    author=ctx.author
    await ctx.send(f'Hey @here! {author.mention} wants to play a game! would you like to join them?')

im assuming you want this to be a command, so it will check for a prefix to call a function instead of using an if statement in the on_message event.

]