1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2026-04-18 16:02:30 +00:00

fix name of allowMultipleAnswers to allowsMultipleAnswers

This commit is contained in:
2026-04-16 13:02:10 +06:00
parent 4a0b890697
commit 83de9fd973
11 changed files with 223 additions and 204 deletions

View File

@@ -2401,7 +2401,7 @@ public suspend inline fun TelegramBot.reply(
questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
closeInfo: ScheduledCloseInfo? = null,
replyInChatId: IdChatIdentifier = to.chat.id,
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
@@ -2424,7 +2424,7 @@ public suspend inline fun TelegramBot.reply(
questionParseMode = questionParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
@@ -2445,7 +2445,7 @@ public suspend inline fun TelegramBot.reply(
options: List<InputPollOption> = poll.options.map { it.asInput() },
isAnonymous: Boolean = poll.isAnonymous,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = poll.allowsMultipleAnswers,
closeInfo: ScheduledCloseInfo? = null,
replyInChatId: IdChatIdentifier = to.chat.id,
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
@@ -2467,8 +2467,8 @@ public suspend inline fun TelegramBot.reply(
closeInfo = closeInfo,
questionParseMode = questionParseMode,
isAnonymous = isAnonymous,
isClosed = allowMultipleAnswers,
allowMultipleAnswers = isClosed,
isClosed = allowsMultipleAnswers,
allowsMultipleAnswers = isClosed,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
@@ -2488,7 +2488,7 @@ public suspend inline fun TelegramBot.reply(
options: List<InputPollOption>,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
closeInfo: ScheduledCloseInfo? = null,
replyInChatId: IdChatIdentifier = to.chat.id,
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
@@ -2510,7 +2510,7 @@ public suspend inline fun TelegramBot.reply(
closeInfo = closeInfo,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
@@ -2530,7 +2530,7 @@ public suspend inline fun TelegramBot.reply(
options: List<InputPollOption> = poll.options.map { it.asInput() },
isAnonymous: Boolean = poll.isAnonymous,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = poll.allowsMultipleAnswers,
closeInfo: ScheduledCloseInfo? = null,
replyInChatId: IdChatIdentifier = to.chat.id,
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
@@ -2551,8 +2551,8 @@ public suspend inline fun TelegramBot.reply(
options = options,
closeInfo = closeInfo,
isAnonymous = isAnonymous,
isClosed = allowMultipleAnswers,
allowMultipleAnswers = isClosed,
isClosed = allowsMultipleAnswers,
allowsMultipleAnswers = isClosed,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
@@ -2573,7 +2573,7 @@ public suspend inline fun TelegramBot.reply(
explanation: String?,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
questionParseMode: ParseMode? = null,
explanationParseMode: ParseMode? = null,
@@ -2602,7 +2602,7 @@ public suspend inline fun TelegramBot.reply(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
@@ -2626,7 +2626,7 @@ public suspend inline fun TelegramBot.reply(
?: error("Correct option ID must be provided by income QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false,
questionParseMode: ParseMode? = null,
explanationParseMode: ParseMode? = null,
@@ -2655,7 +2655,7 @@ public suspend inline fun TelegramBot.reply(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
@@ -2677,7 +2677,7 @@ public suspend inline fun TelegramBot.reply(
explanation: String?,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
explanationParseMode: ParseMode? = null,
closeInfo: ScheduledCloseInfo? = null,
@@ -2704,7 +2704,7 @@ public suspend inline fun TelegramBot.reply(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
@@ -2728,7 +2728,7 @@ public suspend inline fun TelegramBot.reply(
?: error("Correct option ID must be provided by income QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false,
explanationParseMode: ParseMode? = null,
closeInfo: ScheduledCloseInfo? = null,
@@ -2755,7 +2755,7 @@ public suspend inline fun TelegramBot.reply(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
@@ -2776,7 +2776,7 @@ public suspend inline fun TelegramBot.reply(
correctOptionIds: List<Int>,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
questionParseMode: ParseMode? = null,
explanationTextSources: List<TextSource>? = null,
@@ -2804,7 +2804,7 @@ public suspend inline fun TelegramBot.reply(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
@@ -2827,7 +2827,7 @@ public suspend inline fun TelegramBot.reply(
?: error("Correct option ID must be provided by income QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false,
questionParseMode: ParseMode? = null,
explanationTextSources: List<TextSource>? = null,
@@ -2855,7 +2855,7 @@ public suspend inline fun TelegramBot.reply(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
@@ -2876,7 +2876,7 @@ public suspend inline fun TelegramBot.reply(
correctOptionIds: List<Int>,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
explanationTextSources: List<TextSource>? = null,
closeInfo: ScheduledCloseInfo? = null,
@@ -2902,7 +2902,7 @@ public suspend inline fun TelegramBot.reply(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
@@ -2924,7 +2924,7 @@ public suspend inline fun TelegramBot.reply(
correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by income QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false,
explanationTextSources: List<TextSource>? = quizPoll.explanationTextSources,
closeInfo: ScheduledCloseInfo? = null,
@@ -2950,7 +2950,7 @@ public suspend inline fun TelegramBot.reply(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
@@ -2995,7 +2995,7 @@ public suspend inline fun TelegramBot.reply(
question = question,
options = options,
isAnonymous = isAnonymous,
allowMultipleAnswers = isAnonymous,
allowsMultipleAnswers = isAnonymous,
closeInfo = closeInfo,
replyInChatId = replyInChatId,
replyInThreadId = replyInThreadId,
@@ -3067,7 +3067,7 @@ public suspend inline fun TelegramBot.reply(
options = options,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = isAnonymous,
allowsMultipleAnswers = isAnonymous,
closeInfo = closeInfo,
replyInChatId = replyInChatId,
replyInThreadId = replyInThreadId,

View File

@@ -2149,7 +2149,7 @@ public suspend inline fun TelegramBot.reply(
questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
closeInfo: ScheduledCloseInfo? = null,
replyInChatId: IdChatIdentifier = toChatId,
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
@@ -2172,7 +2172,7 @@ public suspend inline fun TelegramBot.reply(
questionParseMode = questionParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
@@ -2194,7 +2194,7 @@ public suspend inline fun TelegramBot.reply(
options: List<InputPollOption> = poll.options.map { it.asInput() },
isAnonymous: Boolean = poll.isAnonymous,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = poll.allowsMultipleAnswers,
closeInfo: ScheduledCloseInfo? = null,
replyInChatId: IdChatIdentifier = toChatId,
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
@@ -2216,8 +2216,8 @@ public suspend inline fun TelegramBot.reply(
closeInfo = closeInfo,
questionParseMode = questionParseMode,
isAnonymous = isAnonymous,
isClosed = allowMultipleAnswers,
allowMultipleAnswers = isClosed,
isClosed = allowsMultipleAnswers,
allowsMultipleAnswers = isClosed,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
@@ -2238,7 +2238,7 @@ public suspend inline fun TelegramBot.reply(
options: List<InputPollOption>,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
closeInfo: ScheduledCloseInfo? = null,
replyInChatId: IdChatIdentifier = toChatId,
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
@@ -2260,7 +2260,7 @@ public suspend inline fun TelegramBot.reply(
closeInfo = closeInfo,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
@@ -2281,7 +2281,7 @@ public suspend inline fun TelegramBot.reply(
options: List<InputPollOption> = poll.options.map { it.asInput() },
isAnonymous: Boolean = poll.isAnonymous,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = poll.allowsMultipleAnswers,
closeInfo: ScheduledCloseInfo? = null,
replyInChatId: IdChatIdentifier = toChatId,
replyInThreadId: MessageThreadId? = replyInChatId.threadId,
@@ -2302,8 +2302,8 @@ public suspend inline fun TelegramBot.reply(
options = options,
closeInfo = closeInfo,
isAnonymous = isAnonymous,
isClosed = allowMultipleAnswers,
allowMultipleAnswers = isClosed,
isClosed = allowsMultipleAnswers,
allowsMultipleAnswers = isClosed,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
businessConnectionId = replyInBusinessConnectionId,
@@ -2325,7 +2325,7 @@ public suspend inline fun TelegramBot.reply(
explanation: String?,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
questionParseMode: ParseMode? = null,
explanationParseMode: ParseMode? = null,
@@ -2354,7 +2354,7 @@ public suspend inline fun TelegramBot.reply(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
@@ -2379,7 +2379,7 @@ public suspend inline fun TelegramBot.reply(
?: error("Correct option ID must be provided by income QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false,
questionParseMode: ParseMode? = null,
explanationParseMode: ParseMode? = null,
@@ -2408,7 +2408,7 @@ public suspend inline fun TelegramBot.reply(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
@@ -2431,7 +2431,7 @@ public suspend inline fun TelegramBot.reply(
explanation: String?,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
explanationParseMode: ParseMode? = null,
closeInfo: ScheduledCloseInfo? = null,
@@ -2458,7 +2458,7 @@ public suspend inline fun TelegramBot.reply(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
@@ -2483,7 +2483,7 @@ public suspend inline fun TelegramBot.reply(
?: error("Correct option ID must be provided by income QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false,
explanationParseMode: ParseMode? = null,
closeInfo: ScheduledCloseInfo? = null,
@@ -2510,7 +2510,7 @@ public suspend inline fun TelegramBot.reply(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
@@ -2532,7 +2532,7 @@ public suspend inline fun TelegramBot.reply(
correctOptionIds: List<Int>,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
questionParseMode: ParseMode? = null,
explanationTextSources: List<TextSource>? = null,
@@ -2560,7 +2560,7 @@ public suspend inline fun TelegramBot.reply(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
@@ -2584,7 +2584,7 @@ public suspend inline fun TelegramBot.reply(
?: error("Correct option ID must be provided by income QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false,
questionParseMode: ParseMode? = null,
explanationTextSources: List<TextSource>? = null,
@@ -2612,7 +2612,7 @@ public suspend inline fun TelegramBot.reply(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
@@ -2634,7 +2634,7 @@ public suspend inline fun TelegramBot.reply(
correctOptionIds: List<Int>,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
explanationTextSources: List<TextSource>? = null,
closeInfo: ScheduledCloseInfo? = null,
@@ -2660,7 +2660,7 @@ public suspend inline fun TelegramBot.reply(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
@@ -2684,7 +2684,7 @@ public suspend inline fun TelegramBot.reply(
?: error("Correct option ID must be provided by income QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false,
explanationTextSources: List<TextSource>? = quizPoll.explanationTextSources,
closeInfo: ScheduledCloseInfo? = null,
@@ -2710,7 +2710,7 @@ public suspend inline fun TelegramBot.reply(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = replyInThreadId,
directMessageThreadId = replyInDirectMessageThreadId,
@@ -2756,7 +2756,7 @@ public suspend inline fun TelegramBot.reply(
question = question,
options = options,
isAnonymous = isAnonymous,
allowMultipleAnswers = isAnonymous,
allowsMultipleAnswers = isAnonymous,
closeInfo = closeInfo,
replyInChatId = replyInChatId,
replyInThreadId = replyInThreadId,
@@ -2828,7 +2828,7 @@ public suspend inline fun TelegramBot.reply(
options = options,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = isAnonymous,
allowsMultipleAnswers = isAnonymous,
closeInfo = closeInfo,
replyInChatId = replyInChatId,
replyInThreadId = replyInThreadId,

View File

@@ -2026,7 +2026,7 @@ public suspend fun TelegramBot.send(
questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
@@ -2046,7 +2046,7 @@ public suspend fun TelegramBot.send(
questionParseMode = questionParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
@@ -2070,7 +2070,7 @@ public suspend fun TelegramBot.send(
options: List<InputPollOption>,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
@@ -2089,7 +2089,7 @@ public suspend fun TelegramBot.send(
closeInfo = closeInfo,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
@@ -2115,7 +2115,7 @@ public suspend fun TelegramBot.send(
isClosed: Boolean = false,
options: List<InputPollOption> = poll.options.map { it.asInput() },
isAnonymous: Boolean = poll.isAnonymous,
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = poll.allowsMultipleAnswers,
closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
@@ -2135,7 +2135,7 @@ public suspend fun TelegramBot.send(
questionParseMode = questionParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
@@ -2160,7 +2160,7 @@ public suspend fun TelegramBot.send(
isClosed: Boolean = false,
options: List<InputPollOption> = poll.options.map { it.asInput() },
isAnonymous: Boolean = poll.isAnonymous,
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = poll.allowsMultipleAnswers,
closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
@@ -2179,7 +2179,7 @@ public suspend fun TelegramBot.send(
closeInfo = closeInfo,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
@@ -2204,7 +2204,7 @@ public suspend fun TelegramBot.send(
questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
@@ -2224,7 +2224,7 @@ public suspend fun TelegramBot.send(
questionParseMode = questionParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
@@ -2250,7 +2250,7 @@ public suspend fun TelegramBot.send(
isClosed: Boolean = false,
options: List<InputPollOption> = poll.options.map { it.asInput() },
isAnonymous: Boolean = poll.isAnonymous,
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = poll.allowsMultipleAnswers,
closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
@@ -2270,7 +2270,7 @@ public suspend fun TelegramBot.send(
questionParseMode = questionParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
@@ -2295,7 +2295,7 @@ public suspend fun TelegramBot.send(
isClosed: Boolean = false,
options: List<InputPollOption> = poll.options.map { it.asInput() },
isAnonymous: Boolean = poll.isAnonymous,
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = poll.allowsMultipleAnswers,
closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
@@ -2314,7 +2314,7 @@ public suspend fun TelegramBot.send(
closeInfo = closeInfo,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
@@ -2340,7 +2340,7 @@ public suspend fun TelegramBot.send(
questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
explanation: String? = null,
explanationParseMode: ParseMode? = null,
@@ -2366,7 +2366,7 @@ public suspend fun TelegramBot.send(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
@@ -2393,7 +2393,7 @@ public suspend fun TelegramBot.send(
questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
explanation: String? = null,
explanationParseMode: ParseMode? = null,
@@ -2419,7 +2419,7 @@ public suspend fun TelegramBot.send(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
@@ -2447,7 +2447,7 @@ public suspend fun TelegramBot.send(
options: List<InputPollOption> = quizPoll.options.map { it.asInput() },
correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false,
explanation: String? = null,
explanationParseMode: ParseMode? = null,
@@ -2473,7 +2473,7 @@ public suspend fun TelegramBot.send(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
@@ -2501,7 +2501,7 @@ public suspend fun TelegramBot.send(
options: List<InputPollOption> = quizPoll.options.map { it.asInput() },
correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false,
explanation: String? = null,
explanationParseMode: ParseMode? = null,
@@ -2527,7 +2527,7 @@ public suspend fun TelegramBot.send(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
@@ -2553,7 +2553,7 @@ public suspend fun TelegramBot.send(
correctOptionIds: List<Int>,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
explanation: String? = null,
explanationParseMode: ParseMode? = null,
@@ -2578,7 +2578,7 @@ public suspend fun TelegramBot.send(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
@@ -2604,7 +2604,7 @@ public suspend fun TelegramBot.send(
correctOptionIds: List<Int>,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
explanation: String? = null,
explanationParseMode: ParseMode? = null,
@@ -2629,7 +2629,7 @@ public suspend fun TelegramBot.send(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
@@ -2656,7 +2656,7 @@ public suspend fun TelegramBot.send(
options: List<InputPollOption> = quizPoll.options.map { it.asInput() },
correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false,
explanation: String? = null,
explanationParseMode: ParseMode? = null,
@@ -2681,7 +2681,7 @@ public suspend fun TelegramBot.send(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
@@ -2708,7 +2708,7 @@ public suspend fun TelegramBot.send(
options: List<InputPollOption> = quizPoll.options.map { it.asInput() },
correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false,
explanation: String? = null,
explanationParseMode: ParseMode? = null,
@@ -2733,7 +2733,7 @@ public suspend fun TelegramBot.send(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
@@ -2761,7 +2761,7 @@ public suspend fun TelegramBot.send(
questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chatId.threadId,
@@ -2784,7 +2784,7 @@ public suspend fun TelegramBot.send(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
@@ -2812,7 +2812,7 @@ public suspend fun TelegramBot.send(
questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chat.id.threadId,
@@ -2835,7 +2835,7 @@ public suspend fun TelegramBot.send(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
@@ -2864,7 +2864,7 @@ public suspend fun TelegramBot.send(
options: List<InputPollOption> = quizPoll.options.map { it.asInput() },
correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false,
closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chatId.threadId,
@@ -2887,7 +2887,7 @@ public suspend fun TelegramBot.send(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
@@ -2916,7 +2916,7 @@ public suspend fun TelegramBot.send(
options: List<InputPollOption> = quizPoll.options.map { it.asInput() },
correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false,
closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chat.id.threadId,
@@ -2939,7 +2939,7 @@ public suspend fun TelegramBot.send(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
@@ -2966,7 +2966,7 @@ public suspend fun TelegramBot.send(
explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chatId.threadId,
@@ -2988,7 +2988,7 @@ public suspend fun TelegramBot.send(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
@@ -3015,7 +3015,7 @@ public suspend fun TelegramBot.send(
explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chat.id.threadId,
@@ -3037,7 +3037,7 @@ public suspend fun TelegramBot.send(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
@@ -3065,7 +3065,7 @@ public suspend fun TelegramBot.send(
options: List<InputPollOption> = quizPoll.options.map { it.asInput() },
correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false,
closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chatId.threadId,
@@ -3087,7 +3087,7 @@ public suspend fun TelegramBot.send(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
@@ -3115,7 +3115,7 @@ public suspend fun TelegramBot.send(
options: List<InputPollOption> = quizPoll.options.map { it.asInput() },
correctOptionIds: List<Int> = quizPoll.correctOptionIds ?: error("Correct option ID must be provided by incoming QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous,
allowMultipleAnswers: Boolean = quizPoll.allowMultipleAnswers,
allowsMultipleAnswers: Boolean = quizPoll.allowsMultipleAnswers,
allowsRevoting: Boolean = false,
closeInfo: ScheduledCloseInfo? = null,
threadId: MessageThreadId? = chat.id.threadId,
@@ -3137,7 +3137,7 @@ public suspend fun TelegramBot.send(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
threadId = threadId,
directMessageThreadId = directMessageThreadId,

View File

@@ -24,7 +24,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
@@ -53,7 +53,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
@@ -83,7 +83,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
@@ -111,7 +111,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
@@ -141,7 +141,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
@@ -168,7 +168,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
@@ -196,7 +196,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
@@ -222,7 +222,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
@@ -253,7 +253,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
@@ -281,7 +281,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
@@ -310,7 +310,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
@@ -337,7 +337,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
@@ -366,7 +366,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
@@ -392,7 +392,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
@@ -419,7 +419,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
@@ -444,7 +444,7 @@ public suspend fun TelegramBot.sendQuizPoll(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,

View File

@@ -21,7 +21,7 @@ public suspend fun TelegramBot.sendRegularPoll(
questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false,
@@ -48,7 +48,7 @@ public suspend fun TelegramBot.sendRegularPoll(
questionParseMode = questionParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions,
@@ -76,7 +76,7 @@ public suspend fun TelegramBot.sendRegularPoll(
options: List<InputPollOption>,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false,
@@ -102,7 +102,7 @@ public suspend fun TelegramBot.sendRegularPoll(
options = options,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions,
@@ -132,7 +132,7 @@ public suspend fun TelegramBot.sendRegularPoll(
questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false,
@@ -158,7 +158,7 @@ public suspend fun TelegramBot.sendRegularPoll(
questionParseMode = questionParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions,
@@ -185,7 +185,7 @@ public suspend fun TelegramBot.sendRegularPoll(
closeInfo: ScheduledCloseInfo?,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false,
@@ -210,7 +210,7 @@ public suspend fun TelegramBot.sendRegularPoll(
closeInfo = closeInfo,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions,

View File

@@ -8048,13 +8048,19 @@ public final class dev/inmo/tgbotapi/requests/send/payments/SendInvoice$Companio
public abstract class dev/inmo/tgbotapi/requests/send/polls/SendPoll : dev/inmo/tgbotapi/abstracts/TextedInput, dev/inmo/tgbotapi/requests/send/abstracts/ReplyingMarkupSendMessageRequest, dev/inmo/tgbotapi/requests/send/abstracts/SendContentMessageRequest {
public fun getAllowSendingWithoutReply ()Ljava/lang/Boolean;
public abstract fun getAllowsMultipleAnswers ()Z
public abstract fun getAllowsRevoting ()Z
public fun getCloseInfo ()Ldev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;
protected final fun getCreationDate-Wg0KzQs ()D
public abstract fun getDescription ()Ljava/lang/String;
public abstract fun getDescriptionTextSources ()Ljava/util/List;
public abstract fun getHideResultsUntilCloses ()Z
public abstract fun getOptions ()Ljava/util/List;
public abstract fun getQuestion ()Ljava/lang/String;
public abstract fun getQuestionParseMode ()Ldev/inmo/tgbotapi/types/message/ParseMode;
public fun getReplyToMessageId-CigXjpw ()Ldev/inmo/tgbotapi/types/MessageId;
public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy;
public abstract fun getShuffleOptions ()Z
public fun getText ()Ljava/lang/String;
public abstract fun getType ()Ljava/lang/String;
public abstract fun isAnonymous ()Z
@@ -8082,22 +8088,22 @@ public final class dev/inmo/tgbotapi/requests/send/polls/SendQuizPoll : dev/inmo
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZZZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Long;Ljava/lang/Long;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;ZZZZZZLjava/util/List;Ljava/lang/Long;Ljava/lang/Long;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;ZZZZZZLjava/util/List;Ljava/lang/Long;Ljava/lang/Long;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getAllowMultipleAnswers ()Z
public fun getAllowPaidBroadcast ()Z
public final fun getAllowsRevoting ()Z
public fun getAllowsMultipleAnswers ()Z
public fun getAllowsRevoting ()Z
public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String;
public fun getChatId ()Ldev/inmo/tgbotapi/types/ChatIdentifier;
public final fun getCorrectOptionIds ()Ljava/util/List;
public final fun getDescription ()Ljava/lang/String;
public fun getDescription ()Ljava/lang/String;
public final fun getDescriptionParseMode ()Ldev/inmo/tgbotapi/types/message/ParseMode;
public final fun getDescriptionTextSources ()Ljava/util/List;
public fun getDescriptionTextSources ()Ljava/util/List;
public fun getDirectMessageThreadId-1osv_qQ ()Ldev/inmo/tgbotapi/types/DirectMessageThreadId;
public fun getDisableNotification ()Z
public fun getEffectId-Ts0V7ak ()Ljava/lang/String;
public final fun getExplanation ()Ljava/lang/String;
public final fun getExplanationParseMode ()Ldev/inmo/tgbotapi/types/message/ParseMode;
public final fun getExplanationTextEntities ()Ljava/util/List;
public final fun getHideResultsUntilCloses ()Z
public fun getHideResultsUntilCloses ()Z
public fun getOptions ()Ljava/util/List;
public fun getProtectContent ()Z
public fun getQuestion ()Ljava/lang/String;
@@ -8105,7 +8111,7 @@ public final class dev/inmo/tgbotapi/requests/send/polls/SendQuizPoll : dev/inmo
public fun getReplyMarkup ()Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;
public fun getReplyParameters ()Ldev/inmo/tgbotapi/types/ReplyParameters;
public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy;
public final fun getShuffleOptions ()Z
public fun getShuffleOptions ()Z
public fun getSuggestedPostParameters ()Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;
public fun getTextSources ()Ljava/util/List;
public fun getThreadId-S3HF-10 ()Ldev/inmo/tgbotapi/types/MessageThreadId;
@@ -8153,18 +8159,18 @@ public final class dev/inmo/tgbotapi/requests/send/polls/SendRegularPoll : dev/i
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/util/List;ZZZZZZZLjava/util/List;Ljava/lang/Long;Ljava/lang/Long;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/util/List;ZZZZZZZLjava/util/List;Ljava/lang/Long;Ljava/lang/Long;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getAllowAddingOptions ()Z
public final fun getAllowMultipleAnswers ()Z
public fun getAllowPaidBroadcast ()Z
public final fun getAllowsRevoting ()Z
public fun getAllowsMultipleAnswers ()Z
public fun getAllowsRevoting ()Z
public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String;
public fun getChatId ()Ldev/inmo/tgbotapi/types/ChatIdentifier;
public final fun getDescription ()Ljava/lang/String;
public fun getDescription ()Ljava/lang/String;
public final fun getDescriptionParseMode ()Ldev/inmo/tgbotapi/types/message/ParseMode;
public final fun getDescriptionTextSources ()Ljava/util/List;
public fun getDescriptionTextSources ()Ljava/util/List;
public fun getDirectMessageThreadId-1osv_qQ ()Ldev/inmo/tgbotapi/types/DirectMessageThreadId;
public fun getDisableNotification ()Z
public fun getEffectId-Ts0V7ak ()Ljava/lang/String;
public final fun getHideResultsUntilCloses ()Z
public fun getHideResultsUntilCloses ()Z
public fun getOptions ()Ljava/util/List;
public fun getProtectContent ()Z
public fun getQuestion ()Ljava/lang/String;
@@ -8172,7 +8178,7 @@ public final class dev/inmo/tgbotapi/requests/send/polls/SendRegularPoll : dev/i
public fun getReplyMarkup ()Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;
public fun getReplyParameters ()Ldev/inmo/tgbotapi/types/ReplyParameters;
public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy;
public final fun getShuffleOptions ()Z
public fun getShuffleOptions ()Z
public fun getSuggestedPostParameters ()Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;
public fun getTextSources ()Ljava/util/List;
public fun getThreadId-S3HF-10 ()Ldev/inmo/tgbotapi/types/MessageThreadId;
@@ -31765,7 +31771,7 @@ public final class dev/inmo/tgbotapi/types/polls/InputPollOption$Companion : kot
public abstract interface class dev/inmo/tgbotapi/types/polls/Poll : dev/inmo/tgbotapi/abstracts/TextedInput, dev/inmo/tgbotapi/types/ReplyInfo$External$ContentVariant {
public static final field Companion Ldev/inmo/tgbotapi/types/polls/Poll$Companion;
public abstract fun getAllowMultipleAnswers ()Z
public abstract fun getAllowsMultipleAnswers ()Z
public abstract fun getAllowsRevoting ()Z
public abstract fun getDescriptionTextSources ()Ljava/util/List;
public abstract fun getId-S5FO_mE ()Ljava/lang/String;
@@ -32122,7 +32128,7 @@ public final class dev/inmo/tgbotapi/types/polls/QuizPoll : dev/inmo/tgbotapi/ty
public final fun copy-YPAypuI (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;ILjava/util/List;Ljava/lang/String;Ljava/util/List;ZZZZLdev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;Ljava/util/List;)Ldev/inmo/tgbotapi/types/polls/QuizPoll;
public static synthetic fun copy-YPAypuI$default (Ldev/inmo/tgbotapi/types/polls/QuizPoll;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;ILjava/util/List;Ljava/lang/String;Ljava/util/List;ZZZZLdev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;Ljava/util/List;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/polls/QuizPoll;
public fun equals (Ljava/lang/Object;)Z
public fun getAllowMultipleAnswers ()Z
public fun getAllowsMultipleAnswers ()Z
public fun getAllowsRevoting ()Z
public final fun getCorrectOptionIds ()Ljava/util/List;
public fun getDescriptionTextSources ()Ljava/util/List;
@@ -32164,7 +32170,7 @@ public final class dev/inmo/tgbotapi/types/polls/RegularPoll : dev/inmo/tgbotapi
public final fun copy-dx2gcjE (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;IZZZZLdev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;Ljava/util/List;)Ldev/inmo/tgbotapi/types/polls/RegularPoll;
public static synthetic fun copy-dx2gcjE$default (Ldev/inmo/tgbotapi/types/polls/RegularPoll;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;IZZZZLdev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;Ljava/util/List;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/polls/RegularPoll;
public fun equals (Ljava/lang/Object;)Z
public fun getAllowMultipleAnswers ()Z
public fun getAllowsMultipleAnswers ()Z
public fun getAllowsRevoting ()Z
public fun getDescriptionTextSources ()Ljava/util/List;
public fun getId-S5FO_mE ()Ljava/lang/String;
@@ -32204,7 +32210,7 @@ public final class dev/inmo/tgbotapi/types/polls/UnknownPollType : dev/inmo/tgbo
public final fun component8 ()Z
public final fun component9 ()Z
public fun equals (Ljava/lang/Object;)Z
public fun getAllowMultipleAnswers ()Z
public fun getAllowsMultipleAnswers ()Z
public fun getAllowsRevoting ()Z
public fun getDescriptionTextSources ()Ljava/util/List;
public fun getId-S5FO_mE ()Ljava/lang/String;

View File

@@ -1,5 +1,6 @@
package dev.inmo.tgbotapi.requests.send.polls
import dev.inmo.kslog.common.w
import dev.inmo.tgbotapi.abstracts.TextedInput
import korlibs.time.DateTime
import dev.inmo.tgbotapi.requests.send.abstracts.ReplyingMarkupSendMessageRequest
@@ -31,15 +32,21 @@ internal fun checkPollInfo(
options: List<InputPollOption>
) {
if (question.length !in pollQuestionTextLength) {
throw IllegalArgumentException("The length of questions for polls must be in $pollQuestionTextLength range, but was ${question.length}")
DefaultKTgBotAPIKSLog.w("checkPollInfo") {
"The length of questions for polls must be in $pollQuestionTextLength range, but was ${question.length}"
}
}
options.forEach {
if (it.text.length !in pollOptionTextLength) {
throw IllegalArgumentException("The length of question option text for polls must be in $pollOptionTextLength range, but was ${it.text.length}")
DefaultKTgBotAPIKSLog.w("checkPollInfo") {
"The length of question option text for polls must be in $pollOptionTextLength range, but was ${it.text.length}"
}
}
}
if (options.size !in pollOptionsLimit) {
throw IllegalArgumentException("The amount of question options for polls must be in $pollOptionsLimit range, but was ${options.size}")
DefaultKTgBotAPIKSLog.w("checkPollInfo") {
"The amount of question options for polls must be in $pollOptionsLimit range, but was ${options.size}"
}
}
}
@@ -75,7 +82,7 @@ fun SendPoll(
questionParseMode = questionParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = false,
allowsMultipleAnswers = false,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions,
@@ -123,7 +130,7 @@ fun SendPoll(
closeInfo = openPeriod?.asApproximateScheduledCloseInfo ?: closeDate?.asExactScheduledCloseInfo,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = false,
allowsMultipleAnswers = false,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions,
@@ -166,7 +173,7 @@ fun Poll.createRequest(
closeInfo = scheduledCloseInfo,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
@@ -206,7 +213,7 @@ fun Poll.createRequest(
closeInfo = scheduledCloseInfo,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = false,
allowsMultipleAnswers = false,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
@@ -225,7 +232,7 @@ fun Poll.createRequest(
closeInfo = scheduledCloseInfo,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = false,
allowsMultipleAnswers = false,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
@@ -261,6 +268,12 @@ sealed class SendPoll : SendContentMessageRequest<ContentMessage<PollContent>>,
abstract val isAnonymous: Boolean
abstract val isClosed: Boolean
abstract val type: String
abstract val allowsMultipleAnswers: Boolean
abstract val allowsRevoting: Boolean
abstract val shuffleOptions: Boolean
abstract val description: String?
abstract val hideResultsUntilCloses: Boolean
abstract val descriptionTextSources: TextSourcesList?
internal abstract val openPeriod: LongSeconds?
internal abstract val closeDate: LongSeconds?

View File

@@ -42,13 +42,13 @@ class SendQuizPoll internal constructor(
@SerialName(isClosedField)
override val isClosed: Boolean = false,
@SerialName(allowsMultipleAnswersField)
val allowMultipleAnswers: Boolean = false,
override val allowsMultipleAnswers: Boolean = false,
@SerialName(allowsRevotingField)
val allowsRevoting: Boolean = false,
override val allowsRevoting: Boolean = false,
@SerialName(shuffleOptionsField)
val shuffleOptions: Boolean = false,
override val shuffleOptions: Boolean = false,
@SerialName(hideResultsUntilClosesField)
val hideResultsUntilCloses: Boolean = false,
override val hideResultsUntilCloses: Boolean = false,
@SerialName(explanationField)
val explanation: String? = null,
@SerialName(explanationParseModeField)
@@ -56,7 +56,7 @@ class SendQuizPoll internal constructor(
@SerialName(explanationEntitiesField)
private val rawExplanationEntities: List<RawMessageEntity>? = null,
@SerialName(descriptionField)
val description: String? = null,
override val description: String? = null,
@SerialName(descriptionParseModeField)
val descriptionParseMode: ParseMode? = null,
@SerialName(descriptionEntitiesField)
@@ -98,7 +98,7 @@ class SendQuizPoll internal constructor(
val explanationTextEntities: List<TextSource>? by lazy {
rawExplanationEntities?.asTextSources(text ?: return@lazy null)
}
val descriptionTextSources: List<TextSource>? by lazy {
override val descriptionTextSources: List<TextSource>? by lazy {
rawDescriptionEntities?.asTextSources(description ?: return@lazy null)
}
@@ -112,7 +112,7 @@ class SendQuizPoll internal constructor(
explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
@@ -139,7 +139,7 @@ class SendQuizPoll internal constructor(
rawQuestionEntities = emptyList(),
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
@@ -172,7 +172,7 @@ class SendQuizPoll internal constructor(
explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
@@ -199,7 +199,7 @@ class SendQuizPoll internal constructor(
rawQuestionEntities = questionEntities.toRawMessageEntities(),
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
@@ -232,7 +232,7 @@ class SendQuizPoll internal constructor(
explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
@@ -258,7 +258,7 @@ class SendQuizPoll internal constructor(
rawQuestionEntities = emptyList(),
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
@@ -290,7 +290,7 @@ class SendQuizPoll internal constructor(
explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
@@ -316,7 +316,7 @@ class SendQuizPoll internal constructor(
rawQuestionEntities = questionEntities.toRawMessageEntities(),
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
@@ -354,7 +354,7 @@ class SendQuizPoll internal constructor(
DefaultKTgBotAPIKSLog.w("SendQuizPoll", "Quiz poll explanation size must be in range $explanationLimit," +
"but actual explanation contains ${text.length} symbols")
}
if (allowMultipleAnswers == false && correctOptionIds.size > 1) {
if (allowsMultipleAnswers == false && correctOptionIds.size > 1) {
DefaultKTgBotAPIKSLog.w("SendQuizPoll", "Multiple answers are disabled for current sendQuizPoll, but multiple correct options passed")
}
}
@@ -371,7 +371,7 @@ fun SendQuizPoll(
explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
@@ -397,7 +397,7 @@ fun SendQuizPoll(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
@@ -427,7 +427,7 @@ fun SendQuizPoll(
explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
@@ -452,7 +452,7 @@ fun SendQuizPoll(
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
@@ -482,7 +482,7 @@ fun SendQuizPoll(
explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
@@ -506,7 +506,7 @@ fun SendQuizPoll(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
@@ -534,7 +534,7 @@ fun SendQuizPoll(
explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
@@ -557,7 +557,7 @@ fun SendQuizPoll(
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,

View File

@@ -41,17 +41,17 @@ class SendRegularPoll constructor(
@SerialName(isClosedField)
override val isClosed: Boolean = false,
@SerialName(allowsMultipleAnswersField)
val allowMultipleAnswers: Boolean = false,
override val allowsMultipleAnswers: Boolean = false,
@SerialName(allowsRevotingField)
val allowsRevoting: Boolean = true,
override val allowsRevoting: Boolean = true,
@SerialName(shuffleOptionsField)
val shuffleOptions: Boolean = false,
override val shuffleOptions: Boolean = false,
@SerialName(allowAddingOptionsField)
val allowAddingOptions: Boolean = false,
@SerialName(hideResultsUntilClosesField)
val hideResultsUntilCloses: Boolean = false,
override val hideResultsUntilCloses: Boolean = false,
@SerialName(descriptionField)
val description: String? = null,
override val description: String? = null,
@SerialName(descriptionParseModeField)
val descriptionParseMode: ParseMode? = null,
@SerialName(descriptionEntitiesField)
@@ -87,7 +87,7 @@ class SendRegularPoll constructor(
) : SendPoll() {
override val textSources: List<TextSource>
get() = rawQuestionEntities.asTextSources(text)
val descriptionTextSources: List<TextSource>? by lazy {
override val descriptionTextSources: List<TextSource>? by lazy {
rawDescriptionEntities?.asTextSources(description ?: return@lazy null)
}
@@ -97,7 +97,7 @@ class SendRegularPoll constructor(
options: List<InputPollOption>,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false,
@@ -124,7 +124,7 @@ class SendRegularPoll constructor(
rawQuestionEntities = questionEntities.toRawMessageEntities(),
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions,
@@ -153,7 +153,7 @@ class SendRegularPoll constructor(
questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false,
@@ -180,7 +180,7 @@ class SendRegularPoll constructor(
rawQuestionEntities = emptyList(),
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions,
@@ -209,7 +209,7 @@ class SendRegularPoll constructor(
questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false,
@@ -235,7 +235,7 @@ class SendRegularPoll constructor(
rawQuestionEntities = emptyList(),
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions,
@@ -263,7 +263,7 @@ class SendRegularPoll constructor(
options: List<InputPollOption>,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false,
@@ -289,7 +289,7 @@ class SendRegularPoll constructor(
rawQuestionEntities = questionEntities.toRawMessageEntities(),
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions,
@@ -333,7 +333,7 @@ fun SendRegularPoll(
questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false,
@@ -357,7 +357,7 @@ fun SendRegularPoll(
questionParseMode = questionParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions,
@@ -385,7 +385,7 @@ fun SendRegularPoll(
closeInfo: ScheduledCloseInfo?,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false,
@@ -408,7 +408,7 @@ fun SendRegularPoll(
options = options,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions,
@@ -435,7 +435,7 @@ fun SendRegularPoll(
closeInfo: ScheduledCloseInfo?,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false,
@@ -460,7 +460,7 @@ fun SendRegularPoll(
closeInfo = closeInfo,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions,
@@ -477,4 +477,4 @@ fun SendRegularPoll(
suggestedPostParameters = suggestedPostParameters,
replyParameters = replyParameters,
replyMarkup = replyMarkup
)
)

View File

@@ -63,7 +63,7 @@ sealed interface Poll : ReplyInfo.External.ContentVariant, TextedInput {
val votesCount: Int
val isClosed: Boolean
val isAnonymous: Boolean
val allowMultipleAnswers: Boolean
val allowsMultipleAnswers: Boolean
val allowsRevoting: Boolean
val scheduledCloseInfo: ScheduledCloseInfo?
val descriptionTextSources: List<TextSource>
@@ -88,7 +88,7 @@ private class RawPoll(
@SerialName(typeField)
val type: String,
@SerialName(allowsMultipleAnswersField)
val allowMultipleAnswers: Boolean = false,
val allowsMultipleAnswers: Boolean = false,
@SerialName(correctOptionIdsField)
val correctOptionIds: List<Int>? = null,
@SerialName(explanationField)
@@ -128,7 +128,7 @@ data class UnknownPollType internal constructor(
override val isClosed: Boolean = false,
@SerialName(isAnonymousField)
override val isAnonymous: Boolean = false,
override val allowMultipleAnswers: Boolean = false,
override val allowsMultipleAnswers: Boolean = false,
override val allowsRevoting: Boolean = true,
override val descriptionTextSources: List<TextSource> = emptyList(),
@Serializable
@@ -152,7 +152,7 @@ data class RegularPoll(
override val votesCount: Int,
override val isClosed: Boolean = false,
override val isAnonymous: Boolean = false,
override val allowMultipleAnswers: Boolean = false,
override val allowsMultipleAnswers: Boolean = false,
override val allowsRevoting: Boolean = true,
override val scheduledCloseInfo: ScheduledCloseInfo? = null,
override val descriptionTextSources: List<TextSource> = emptyList()
@@ -170,7 +170,7 @@ data class QuizPoll(
val explanationTextSources: List<TextSource> = emptyList(),
override val isClosed: Boolean = false,
override val isAnonymous: Boolean = false,
override val allowMultipleAnswers: Boolean = false,
override val allowsMultipleAnswers: Boolean = false,
override val allowsRevoting: Boolean = false,
override val scheduledCloseInfo: ScheduledCloseInfo? = null,
override val descriptionTextSources: List<TextSource> = emptyList()
@@ -196,7 +196,7 @@ object PollSerializer : KSerializer<Poll> {
explanationTextSources = rawPoll.explanation?.let { rawPoll.explanationEntities.asTextSources(it) } ?: emptyList(),
isClosed = rawPoll.isClosed,
isAnonymous = rawPoll.isAnonymous,
allowMultipleAnswers = rawPoll.allowMultipleAnswers,
allowsMultipleAnswers = rawPoll.allowsMultipleAnswers,
allowsRevoting = rawPoll.allowsRevoting ?: false,
scheduledCloseInfo = rawPoll.scheduledCloseInfo,
descriptionTextSources = rawPoll.description?.let { rawPoll.descriptionEntities.asTextSources(it) } ?: emptyList()
@@ -209,7 +209,7 @@ object PollSerializer : KSerializer<Poll> {
votesCount = rawPoll.votesCount,
isClosed = rawPoll.isClosed,
isAnonymous = rawPoll.isAnonymous,
allowMultipleAnswers = rawPoll.allowMultipleAnswers,
allowsMultipleAnswers = rawPoll.allowsMultipleAnswers,
allowsRevoting = rawPoll.allowsRevoting ?: true,
scheduledCloseInfo = rawPoll.scheduledCloseInfo,
descriptionTextSources = rawPoll.description?.let { rawPoll.descriptionEntities.asTextSources(it) } ?: emptyList()
@@ -239,7 +239,7 @@ object PollSerializer : KSerializer<Poll> {
isClosed = value.isClosed,
isAnonymous = value.isAnonymous,
type = regularPollType,
allowMultipleAnswers = value.allowMultipleAnswers,
allowsMultipleAnswers = value.allowsMultipleAnswers,
allowsRevoting = value.allowsRevoting,
description = value.descriptionTextSources.makeSourceString().takeIf { it.isNotEmpty() },
descriptionEntities = value.descriptionTextSources.toRawMessageEntities(),
@@ -255,7 +255,7 @@ object PollSerializer : KSerializer<Poll> {
isClosed = value.isClosed,
isAnonymous = value.isAnonymous,
type = quizPollType,
allowMultipleAnswers = value.allowMultipleAnswers,
allowsMultipleAnswers = value.allowsMultipleAnswers,
correctOptionIds = value.correctOptionIds,
allowsRevoting = value.allowsRevoting,
explanation = value.explanation,

View File

@@ -21,7 +21,7 @@ val Poll.type: String
}
@RiskFeature(RawFieldsUsageWarning)
val Poll.allows_multiple_answers: Boolean
get() = allowMultipleAnswers
get() = allowsMultipleAnswers
@RiskFeature(RawFieldsUsageWarning)
val Poll.correct_option_id: List<Int>?
get() = asQuizPoll() ?.correctOptionIds