Skip to main content

Voting on a poll

The method can be used to register a vote on a poll. It accepts the following params.

ParamTypeDefault ValueRequiredDescription
pollMessageDytePollMessage-yesThe poll message to vote on.
pollOptionDytePollOption-yesThe option to vote for.

The following snippet votes for the 1st option on the 1st poll created in the meeting.

let poll: DytePollMessage = meeting.polls.items[0]
let selectedPollOption: DytePollOption = poll.options[0], selectedPollOption)