❔ Awaiting for multiple interactions DSharp+

I'm using DSharp+ Library Right now i'm doing this:
var result = await interactivity.WaitForButtonAsync(pollMessage).ConfigureAwait(false);
var result = await interactivity.WaitForButtonAsync(pollMessage).ConfigureAwait(false);
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
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mirrory (Please ping me)
without that I wait for multiples interactions?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mirrory (Please ping me)
Uh ok
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mirrory (Please ping me)
I see i-m reading on it
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mirrory (Please ping me)
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
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mirrory (Please ping me)
If i have this var result = await interactivity.WaitForButtonAsync(pollMessage)
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mirrory (Please ping me)
i only get the first button pressed then codes goes through
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mirrory (Please ping me)
I need like a wait to have this await for everything But ive nevere done anything like that
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mirrory (Please ping me)
I may be have a wait to know but some people may quit so lets say random
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mirrory (Please ping me)
uuuh nice
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mirrory (Please ping me)
never learned event or delegate i need to study it
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mirrory (Please ping me)
Idk now I now what i need to study now I know lul
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mirrory (Please ping me)
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
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Accord
Accord3y ago
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.

Did you find this page helpful?