commonMain.dev.inmo.tgbotapi.extensions.api.send.polls.SendQuizPoll.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tgbotapi.api-jvm Show documentation
Show all versions of tgbotapi.api-jvm Show documentation
API extensions with "Telegram Bot API"-like extensions for TelegramBot and RequestsExecutor
package dev.inmo.tgbotapi.extensions.api.send.polls
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.send.polls.SendQuizPoll
import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.PollContent
import dev.inmo.tgbotapi.types.message.textsources.TextSource
import dev.inmo.tgbotapi.types.polls.InputPollOption
import dev.inmo.tgbotapi.types.polls.ScheduledCloseInfo
public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier,
question: String,
options: List,
correctOptionId: Int,
explanation: String?,
questionParseMode: ParseMode? = null,
explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
openPeriod: LongSeconds? = null,
closeDate: LongSeconds? = null,
threadId: MessageThreadId? = chatId.threadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage = execute(
SendQuizPoll(
chatId,
question,
options,
correctOptionId,
explanation,
questionParseMode,
explanationParseMode,
isAnonymous,
isClosed,
openPeriod,
closeDate,
threadId,
businessConnectionId,
disableNotification,
protectContent,
effectId,
replyParameters,
replyMarkup
)
)
public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier,
questionEntities: List,
options: List,
correctOptionId: Int,
explanation: String?,
explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
openPeriod: LongSeconds? = null,
closeDate: LongSeconds? = null,
threadId: MessageThreadId? = chatId.threadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage = execute(
SendQuizPoll(
chatId,
questionEntities,
options,
correctOptionId,
explanation,
explanationParseMode,
isAnonymous,
isClosed,
openPeriod,
closeDate,
threadId,
businessConnectionId,
disableNotification,
protectContent,
effectId,
replyParameters,
replyMarkup
)
)
public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier,
question: String,
options: List,
correctOptionId: Int,
explanationTextSources: List? = null,
questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
openPeriod: LongSeconds? = null,
closeDate: LongSeconds? = null,
threadId: MessageThreadId? = chatId.threadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage = execute(
SendQuizPoll(
chatId,
question,
options,
correctOptionId,
questionParseMode,
explanationTextSources,
isAnonymous,
isClosed,
openPeriod,
closeDate,
threadId,
businessConnectionId,
disableNotification,
protectContent,
effectId,
replyParameters,
replyMarkup
)
)
public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier,
questionEntities: List,
options: List,
correctOptionId: Int,
explanationTextSources: List? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
openPeriod: LongSeconds? = null,
closeDate: LongSeconds? = null,
threadId: MessageThreadId? = chatId.threadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage = execute(
SendQuizPoll(
chatId,
questionEntities,
options,
correctOptionId,
explanationTextSources,
isAnonymous,
isClosed,
openPeriod,
closeDate,
threadId,
businessConnectionId,
disableNotification,
protectContent,
effectId,
replyParameters,
replyMarkup
)
)
public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier,
question: String,
options: List,
correctOptionId: Int,
closeInfo: ScheduledCloseInfo?,
questionParseMode: ParseMode? = null,
explanation: String?,
explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
threadId: MessageThreadId? = chatId.threadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage = execute(
SendQuizPoll(
chatId,
question,
options,
correctOptionId,
closeInfo,
explanation,
questionParseMode,
explanationParseMode,
isAnonymous,
isClosed,
threadId,
businessConnectionId,
disableNotification,
protectContent,
effectId,
replyParameters,
replyMarkup
)
)
public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier,
questionEntities: List,
options: List,
correctOptionId: Int,
closeInfo: ScheduledCloseInfo?,
explanation: String?,
explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
threadId: MessageThreadId? = chatId.threadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage = execute(
SendQuizPoll(
chatId,
questionEntities,
options,
correctOptionId,
closeInfo,
explanation,
explanationParseMode,
isAnonymous,
isClosed,
threadId,
businessConnectionId,
disableNotification,
protectContent,
effectId,
replyParameters,
replyMarkup
)
)
public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier,
question: String,
options: List,
correctOptionId: Int,
closeInfo: ScheduledCloseInfo?,
questionParseMode: ParseMode? = null,
explanationTextSources: List? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
threadId: MessageThreadId? = chatId.threadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage = execute(
SendQuizPoll(
chatId,
question,
options,
correctOptionId,
closeInfo,
questionParseMode,
explanationTextSources,
isAnonymous,
isClosed,
threadId,
businessConnectionId,
disableNotification,
protectContent,
effectId,
replyParameters,
replyMarkup
)
)
public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier,
questionEntities: List,
options: List,
correctOptionId: Int,
closeInfo: ScheduledCloseInfo?,
explanationTextSources: List? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
threadId: MessageThreadId? = chatId.threadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage = execute(
SendQuizPoll(
chatId,
questionEntities,
options,
correctOptionId,
closeInfo,
explanationTextSources,
isAnonymous,
isClosed,
threadId,
businessConnectionId,
disableNotification,
protectContent,
effectId,
replyParameters,
replyMarkup
)
)