mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-10-25 14:07:28 +00:00
continue fixing missing parts
This commit is contained in:
1 parent
8d3338b79a
commit
08877a8f47
4 files changed
+80
-71
No files matched your search
@@ -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)
|
||||
|
||||
|
||||
-7
@@ -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
|
||||
|
||||
+1
-1
@@ -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