mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-04-16 23:12:33 +00:00
continue fixing missing parts
This commit is contained in:
@@ -2617,15 +2617,6 @@ inline fun InlineKeyboardButton.asUnknownInlineKeyboardButton(): UnknownInlineKe
|
||||
inline fun InlineKeyboardButton.requireUnknownInlineKeyboardButton(): UnknownInlineKeyboardButton =
|
||||
this as UnknownInlineKeyboardButton
|
||||
|
||||
@PreviewFeature
|
||||
inline fun <T> Poll.whenMultipleAnswersPoll(block: (MultipleAnswersPoll) -> T) = asMultipleAnswersPoll()?.let(block)
|
||||
|
||||
@PreviewFeature
|
||||
inline fun Poll.asMultipleAnswersPoll(): MultipleAnswersPoll? = this as? MultipleAnswersPoll
|
||||
|
||||
@PreviewFeature
|
||||
inline fun Poll.requireMultipleAnswersPoll(): MultipleAnswersPoll = this as MultipleAnswersPoll
|
||||
|
||||
@PreviewFeature
|
||||
inline fun <T> Poll.whenQuizPoll(block: (QuizPoll) -> T) = asQuizPoll()?.let(block)
|
||||
|
||||
|
||||
@@ -489,7 +489,6 @@ import dev.inmo.tgbotapi.types.payments.stars.StarTransaction
|
||||
import dev.inmo.tgbotapi.types.payments.stars.TransactionPartner
|
||||
import dev.inmo.tgbotapi.types.polls.ApproximateScheduledCloseInfo
|
||||
import dev.inmo.tgbotapi.types.polls.ExactScheduledCloseInfo
|
||||
import dev.inmo.tgbotapi.types.polls.MultipleAnswersPoll
|
||||
import dev.inmo.tgbotapi.types.polls.Poll
|
||||
import dev.inmo.tgbotapi.types.polls.PollAnswer
|
||||
import dev.inmo.tgbotapi.types.polls.PollOptionAdded
|
||||
@@ -2301,12 +2300,6 @@ public inline fun ScheduledCloseInfo.approximateScheduledCloseInfoOrThrow(): App
|
||||
|
||||
public inline fun <T> ScheduledCloseInfo.ifApproximateScheduledCloseInfo(block: (ApproximateScheduledCloseInfo) -> T): T? = approximateScheduledCloseInfoOrNull() ?.let(block)
|
||||
|
||||
public inline fun Poll.multipleAnswersPollOrNull(): MultipleAnswersPoll? = this as? dev.inmo.tgbotapi.types.polls.MultipleAnswersPoll
|
||||
|
||||
public inline fun Poll.multipleAnswersPollOrThrow(): MultipleAnswersPoll = this as dev.inmo.tgbotapi.types.polls.MultipleAnswersPoll
|
||||
|
||||
public inline fun <T> Poll.ifMultipleAnswersPoll(block: (MultipleAnswersPoll) -> T): T? = multipleAnswersPollOrNull() ?.let(block)
|
||||
|
||||
public inline fun Poll.unknownPollTypeOrNull(): UnknownPollType? = this as? dev.inmo.tgbotapi.types.polls.UnknownPollType
|
||||
|
||||
public inline fun Poll.unknownPollTypeOrThrow(): UnknownPollType = this as dev.inmo.tgbotapi.types.polls.UnknownPollType
|
||||
|
||||
@@ -21,7 +21,7 @@ val Poll.type: String
|
||||
}
|
||||
@RiskFeature(RawFieldsUsageWarning)
|
||||
val Poll.allows_multiple_answers: Boolean
|
||||
get() = asMultipleAnswersPoll() ?.allowMultipleAnswers == true
|
||||
get() = allowMultipleAnswers
|
||||
@RiskFeature(RawFieldsUsageWarning)
|
||||
val Poll.correct_option_id: List<Int>?
|
||||
get() = asQuizPoll() ?.correctOptionIds
|
||||
|
||||
Reference in New Issue
Block a user