Gryphire / wisperbot

Telegram bot for Wisper
0 stars 0 forks source link

Adjusted /prompt command: shortlist instead of one option #9

Closed Gryphire closed 8 months ago

Gryphire commented 1 year ago

Youth advisors have requested that upon calling the /prompt command the bot should provide a short list selection from the database rather than just one option.

If possible, the bot should also enable users to vote on items in the provided list so that they can decide on which prompt they will be going with in a streamlined manner.

lydgate commented 1 year ago

Probably we can do this using a poll.

See these:

Yes! The way I envision it, it could be a selection of three prompts from the database file, and they all can vote on the prompt (or maybe prompts, so allowing multiple votes) they would be interested in discussing. Not sure if the api functionality allows it, but if the poll could also automatically detect when everybody has voted and which answer won that’d be great, because otherwise I foresee people might linger for quite a while in that space between voting and acting on the outcome.

Would not need cross-chat coordination, and can be stored in json in the files directory.

lydgate commented 1 year ago

OK, got this sort of working: image

It doesn't yet do any clever vote counting, and it can't handle prompts longer than 100 characters: image

lydgate commented 1 year ago

Basic (annoying) counting should be working; still need to figure out how to get the number of people in a group but it should be straightforward. Only question is how to update that number as people are added...

lydgate commented 1 year ago