1
如果有人写“?name(arg)”我想让我的机器人说消息的作者+“,你的名字是”+ arg。 虽然我找不到消息的作者。查找作者的消息
<!-- language: lang-py -->
@client.command()
async def name(their_name):
await client.say("{0}, your name is {1}.".format("""author of the message goes here""", their_name))
我试过这段代码,它说消息没有定义,所以我在代码的顶部定义了消息,现在它说str没有属性作者。 – TRSI