diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/polls/SendPoll.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/polls/SendPoll.kt index b68320164f..07aed23c77 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/polls/SendPoll.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/polls/SendPoll.kt @@ -202,6 +202,22 @@ suspend fun RequestsExecutor.sendRegularPoll( chatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, disableNotification, replyToMessageId, replyMarkup ) ) +suspend fun RequestsExecutor.sendRegularPoll( + chatId: ChatIdentifier, + poll: RegularPoll, + isClosed: Boolean = false, + question: String = poll.question, + options: List = poll.options.map { it.text }, + isAnonymous: Boolean = poll.isAnonymous, + allowMultipleAnswers: Boolean = poll.allowMultipleAnswers, + disableNotification: Boolean = false, + replyToMessageId: MessageIdentifier? = null, + replyMarkup: KeyboardMarkup? = null +) = execute( + SendRegularPoll( + chatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, disableNotification, replyToMessageId, replyMarkup + ) +) suspend fun RequestsExecutor.sendRegularPoll( chat: Chat, @@ -217,6 +233,21 @@ suspend fun RequestsExecutor.sendRegularPoll( chat.id, question, options, isAnonymous, isClosed, allowMultipleAnswers, disableNotification, replyToMessageId, replyMarkup ) +suspend fun RequestsExecutor.sendRegularPoll( + chat: Chat, + poll: RegularPoll, + isClosed: Boolean = false, + question: String = poll.question, + options: List = poll.options.map { it.text }, + isAnonymous: Boolean = poll.isAnonymous, + allowMultipleAnswers: Boolean = poll.allowMultipleAnswers, + disableNotification: Boolean = false, + replyToMessageId: MessageIdentifier? = null, + replyMarkup: KeyboardMarkup? = null +) = sendRegularPoll( + chat.id, question, options, isAnonymous, isClosed, allowMultipleAnswers, disableNotification, replyToMessageId, replyMarkup +) + suspend fun RequestsExecutor.sendQuizPoll( chatId: ChatIdentifier,