Home > Enterprise >  Can you wait for user response message with bwmarrin/discordgo?
Can you wait for user response message with bwmarrin/discordgo?

Time:03-22

Is there any option to wait for user response message in discordgo? I'm looking for something similar to discord.js awaitMessages.

CodePudding user response:

No, but you can make a collection that holds message and event information and checking news messages.

Simply

  1. Make a collection/array
  2. Add message information
  3. Check if the incoming message in the message event handler is in the collection
  4. Handle event
  5. Remove from collection

Don't forget set a timeout and clear expired data from collection.

  • Related