❔ Awaiting for multiple interactions DSharp+
I'm using DSharp+ Library
Right now i'm doing this:
but obviously I get the first message and then the code goes through. The expected outcome I want is like set a timer (I can do that) and until then collect all the results (multiple discord users clicking on the buttons) and then at the end of the timer, elaborate the data (I can do that).
I really have no clue on how to do that, I probably need to use tasks or thread but I've never used them. If you can help me and also point me towards some good resources on that I would love it
31 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
without that I wait for multiples interactions?
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Uh ok
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
I see i-m reading on it
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
I'm making a quiz bot
the command is already implemented
I send
/quiz 20
the bot replies with a message and buttons, the message containing the question and buttons as answers
This all works
For these 20 seconds I wanna collect all button pressed from users and then elaborate results at the end
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
If i have this var result = await interactivity.WaitForButtonAsync(pollMessage)
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
i only get the first button pressed
then codes goes through
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
I need like a wait to have this await for everything
But ive nevere done anything like that
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
I may be have a wait to know
but some people may quit
so lets say random
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
uuuh nice
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
never learned event or delegate i need to study it
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
yes
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Idk now I now what i need to study
now I know
lul
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
ok thanks
sometimes it-s confusing
you need to do some stuff and you can-t find the thing you need to learn
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.