atuttle / zoidbox

An IRC bot that (attempts to) bring the knowledge and wit of @boyzoid to ##coldfusion on freenode
3 stars 6 forks source link

Create #poll for strawpolls #17

Closed ryanguill closed 9 years ago

ryanguill commented 9 years ago

going to explore a different syntax, more like a command line - if it works will reactor other commands later. Allow responses through PM so it can be anonymous.

Let me know thoughts on syntax and api.

#poll -create 'What is your favorite?' -options: ['Option A', 'Option B', 'Option C', 'Option D'] response: poll created, use #poll -open to start

validate at least two options

#poll -open response: Poll Open! Question:What is your Favorite?A: Option A, B: Option B, C: Option C, D: Option D ~ respond through PM with #poll [option-letter]

In room or PM: #poll A response: Your vote has been cast!

Keep track of who has voted, do not let them vote twice.

In room: #poll -status response: there have been 5 responses so far. The poll has been open for 10 minutes.

#poll -close response: Poll Closed!What is your Favorite?A: Option A 5% ~ B: Option B 10% ~ C: Option C 15% ~ D: Option D 70% - There were 15 responses in 25 minutes.

ryanguill commented 9 years ago

Perhaps an ops ability to:

#poll -peek to see current results without closing the poll

atuttle commented 9 years ago

:+1:

ryanguill commented 9 years ago

#poll response: There is no open poll.

or

response: Question:What is your Favorite?A: Option A, B: Option B, C: Option C, D: Option D ~ respond through PM with #poll [option-letter]

ryanguill commented 9 years ago

#poll -rescind to remove a previous vote

store polls and data in redis to survive restarts

handle ties and no votes better when displaying results.