It is now valid to create polls without a duration and which must be manually halted. However after 30 days these polls will expire automatically.
The
PollStartevent is deprecated in favor ofPollProgress.A
PollProgressevent is formatted like so:{ "question": "How's the weather?", "answers": [ { "id": 0, "answer": "Good.", "responses": 2 }, { "id": 1, "answer": "Bad.", "responses": 12 } ], "author": { "user_name": "USERNAME", "user_id": 12345, "user_roles": [ "Mod" ] }, "duration": 29996, "endsAt": 1465533783407, "voted": 1 }
votedindicates the option that the user voted for in the poll. Theresponsesin this event will benullifvotedisnull.durationandendsAtwill benullfor polls without a termination.This event will be sent: - once when the poll is created - once to new users who join the channel - after the user votes for an option or forfeits their vote, periodically with the latest results
The
PollEndevent has been changed to have an identical format as thePollProgressevent.The
vote:choosemethod takes the responseidinstead of the index of the answer.The
vote:forfeitmethod has been added which causes the user to give up their vote. The response will be aPollProgress-formatted event withvotedset to-1and responses included.A
vote:endevent has been added, which requires thepoll_startpermission. Calling this method will instantly end the ongoing poll.
Created
December 20, 2016 22:03
-
-
Save ProbablePrime/153677e8bebcd06a2a9a0b44f794e1e2 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment