我想使用Discord.py创建申请表,例如,用户发送“ $ register”,然后他一个接一个地询问问题(您的名字是什么,您的姓氏是什么?)。
只有一个用户使用此代码时,我可以处理
members_list = []
@client.event
async def on_message(message):
if message.content.startswith('$register'):
if message.author not in members_list:
members_list.append(message.author)
await message.channel.send('What is your first name ?')
def check(m):
return m.author in members_list
msg1 = await client.wait_for('message',check=check)
await message.channel.send('Hello {}!,what is your last name'.format(msg1.content))
msg2 = await client.wait_for('message',check=check)
await message.channel.send('{},your application has been aproved!'.format(msg1.content))
但是当用户很多时,当另一个用户回答第二个问题时,就好像他也回答了另一个用户问题一样。
任何人都可以帮忙吗?