简体   繁体   中英

How do I wait for a reply in Discord.net

I am creating a Discord bot using Discord.net. I would like to add some commands that would require multiple steps for a command. An example of this would be a command like "+give". Once the user has typed "+give", I would like the bot to respond by saying something along the lines of, "how much". The user would reply how many points they would like to give (points have already been implemented), and then the bot will say "to who?" and the user will reply with a person in the server. I have tried quite a few solutions, but none of them have worked. If anyone has any idea how to do this, that would be great. Thank you.

One possible solution is to make 2 commands, like +give and +amount. Then, make a variable that turns true when you use the command +give. Use an if statement to then see if you can use +amount.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM