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
PollStart
event is deprecated in favor ofPollProgress
.A
PollProgress
event 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 }
voted
indicates the option that the user voted for in the poll. Theresponses
in this event will benull
ifvoted
isnull
.duration
andendsAt
will benull
for 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
PollEnd
event has been changed to have an identical format as thePollProgress
event.The
vote:choose
method takes the responseid
instead of the index of the answer.The
vote:forfeit
method has been added which causes the user to give up their vote. The response will be aPollProgress
-formatted event withvoted
set to-1
and responses included.A
vote:end
event has been added, which requires thepoll_start
permission. 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