我一直在尝试创建一个机器人命令,在发送命令后侦听消息。这旨在用于创建命令作者的配置文件,以便稍后存储在 JSON 文件中。
@client.command() #creates player profile
async def create(ctx):
await ctx.send("You will be asked a series of questions to create your Profile. If you accidentally typed this wait 15 seconds for it to cancel.")
message = await client.wait_for('message',check=None,timeout=15)
await ctx.send(message) #used to check what message is holding
Run Code Online (Sandbox Code Playgroud)
虽然上面的代码可以工作,但它并没有按照我想要的方式工作。它会发回服务器、成员、频道、消息和作者的 ID 以及其他信息,而不是保留命令作者的回复。