I want to create application form using Discord.py, for example the user send '$register' then he get questions one by one (What is your first name?, what is your last name?).
(我想使用Discord.py创建申请表,例如,用户发送“ $ register”,然后他一个接一个地询问问题(您的名字是什么,您的名字是什么?)。)
I can handle this when there is only one user using this code
(当只有一个用户使用此代码时,我可以处理此问题)
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))
But when there are a lot of users, when another user answer the seconde question, it's count like he also answer the other users question.
(但是,在有很多用户的情况下,当另一个用户回答第二个问题时,就像他也回答另一个用户问题一样。)
can anyone help ?
(有人可以帮忙吗?)
ask by B. Okba translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…