【发布时间】:2022-01-10 23:33:56
【问题描述】:
@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')
我是新手,所以请解释我做错了什么。
【问题讨论】:
-
您在 f 字符串中缺少
f"{author.mention}..." -
我假设您使用的是 discord.py,所以我为您添加了 discord.py 标签。如果不正确,您可以edit。顺便说一句,欢迎来到 SO!查看tour 和How to Ask。
标签: python discord discord.py