addPollOption

fun BaseChannel.addPollOption(pollId: Long, optionText: String, handler: ResultHandler<Poll>?)

Adds an option with optionText to this poll. Once added successfully, a non-null Poll instance will be passed to the ResultHandler.

Since

4.15.0

Parameters

pollId

The ID of the poll to add an option

optionText

The option text to add

handler

The handler for the result


suspend fun BaseChannel.addPollOption(pollId: Long, optionText: String): Poll

Deprecated

As of 4.17.0, replaced with awaitAddPollOption(pollId, optionText).

Replace with

awaitAddPollOption(pollId, optionText)

Add poll option

Return

The poll with added option

Since

4.15.0

Parameters

pollId

The poll id to add option

optionText

The option text to add