docs / com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.polls

Package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.polls

Functions

(common)

sendQuizPoll

suspend fun RequestsExecutor.sendQuizPoll(chatId: ChatIdentifier, question: String, options: List<String>, correctOptionId: Int, isAnonymous: Boolean = true, isClosed: Boolean = false, explanation: String? = null, parseMode: ParseMode? = null, closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, replyToMessageId: MessageIdentifier? = null, replyMarkup: KeyboardMarkup? = null): ContentMessage<PollContent>
suspend fun RequestsExecutor.sendQuizPoll(chat: Chat, question: String, options: List<String>, correctOptionId: Int, isAnonymous: Boolean = true, isClosed: Boolean = false, explanation: String? = null, parseMode: ParseMode? = null, closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, replyToMessageId: MessageIdentifier? = null, replyMarkup: KeyboardMarkup? = null): ContentMessage<PollContent>
suspend fun RequestsExecutor.sendQuizPoll(chatId: ChatIdentifier, isClosed: Boolean = false, quizPoll: QuizPoll, question: String = quizPoll.question, options: List<String> = quizPoll.options.map { it.text }, correctOptionId: Int = quizPoll.correctOptionId ?: error("Correct option ID must be provided by income QuizPoll or by developer"), isAnonymous: Boolean = quizPoll.isAnonymous, explanation: String? = null, parseMode: ParseMode? = null, closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, replyToMessageId: MessageIdentifier? = null, replyMarkup: KeyboardMarkup? = null): ContentMessage<PollContent>
suspend fun RequestsExecutor.sendQuizPoll(chat: Chat, isClosed: Boolean = false, quizPoll: QuizPoll, question: String = quizPoll.question, options: List<String> = quizPoll.options.map { it.text }, correctOptionId: Int = quizPoll.correctOptionId ?: error("Correct option ID must be provided by income QuizPoll or by developer"), isAnonymous: Boolean = quizPoll.isAnonymous, explanation: String? = null, parseMode: ParseMode? = null, closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, replyToMessageId: MessageIdentifier? = null, replyMarkup: KeyboardMarkup? = null): ContentMessage<PollContent>
(common)

sendRegularPoll

suspend fun RequestsExecutor.sendRegularPoll(chatId: ChatIdentifier, question: String, options: List<String>, isAnonymous: Boolean = true, isClosed: Boolean = false, allowMultipleAnswers: Boolean = false, closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, replyToMessageId: MessageIdentifier? = null, replyMarkup: KeyboardMarkup? = null): ContentMessage<PollContent>
suspend fun RequestsExecutor.sendRegularPoll(chatId: ChatIdentifier, poll: RegularPoll, isClosed: Boolean = false, question: String = poll.question, options: List<String> = poll.options.map { it.text }, isAnonymous: Boolean = poll.isAnonymous, allowMultipleAnswers: Boolean = poll.allowMultipleAnswers, closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, replyToMessageId: MessageIdentifier? = null, replyMarkup: KeyboardMarkup? = null): ContentMessage<PollContent>
suspend fun RequestsExecutor.sendRegularPoll(chat: Chat, question: String, options: List<String>, isAnonymous: Boolean = true, isClosed: Boolean = false, allowMultipleAnswers: Boolean = false, closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, replyToMessageId: MessageIdentifier? = null, replyMarkup: KeyboardMarkup? = null): ContentMessage<PollContent>
suspend fun RequestsExecutor.sendRegularPoll(chat: Chat, poll: RegularPoll, isClosed: Boolean = false, question: String = poll.question, options: List<String> = poll.options.map { it.text }, isAnonymous: Boolean = poll.isAnonymous, allowMultipleAnswers: Boolean = poll.allowMultipleAnswers, closeInfo: ScheduledCloseInfo? = null, disableNotification: Boolean = false, replyToMessageId: MessageIdentifier? = null, replyMarkup: KeyboardMarkup? = null): ContentMessage<PollContent>