mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-03 15:19:30 +00:00
improve support of send checklist
This commit is contained in:
@@ -1217,6 +1217,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
||||
public static final fun chatSharedRequestOrThrow (Ldev/inmo/tgbotapi/types/request/RequestResponse;)Ldev/inmo/tgbotapi/types/request/ChatSharedRequest;
|
||||
public static final fun chatThemeOrNull (Ldev/inmo/tgbotapi/types/BackgroundType;)Ldev/inmo/tgbotapi/types/BackgroundType$ChatTheme;
|
||||
public static final fun chatThemeOrThrow (Ldev/inmo/tgbotapi/types/BackgroundType;)Ldev/inmo/tgbotapi/types/BackgroundType$ChatTheme;
|
||||
public static final fun checklistContentOrNull (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/ChecklistContent;
|
||||
public static final fun checklistContentOrThrow (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/ChecklistContent;
|
||||
public static final fun chooseStickerActionOrNull (Ldev/inmo/tgbotapi/types/actions/BotAction;)Ldev/inmo/tgbotapi/types/actions/ChooseStickerAction;
|
||||
public static final fun chooseStickerActionOrThrow (Ldev/inmo/tgbotapi/types/actions/BotAction;)Ldev/inmo/tgbotapi/types/actions/ChooseStickerAction;
|
||||
public static final fun chosenInlineResultOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/InlineQueries/ChosenInlineResult/ChosenInlineResult;
|
||||
@@ -1591,6 +1593,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
||||
public static final fun ifChatSharedRequest (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChatSharedRequest (Ldev/inmo/tgbotapi/types/request/RequestResponse;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChatTheme (Ldev/inmo/tgbotapi/types/BackgroundType;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChecklistContent (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChooseStickerAction (Ldev/inmo/tgbotapi/types/actions/BotAction;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChosenInlineResult (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChosenInlineResultUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
|
@@ -325,6 +325,7 @@ import dev.inmo.tgbotapi.types.message.abstracts.UnknownMessageType
|
||||
import dev.inmo.tgbotapi.types.message.content.AnimationContent
|
||||
import dev.inmo.tgbotapi.types.message.content.AudioContent
|
||||
import dev.inmo.tgbotapi.types.message.content.AudioMediaGroupPartContent
|
||||
import dev.inmo.tgbotapi.types.message.content.ChecklistContent
|
||||
import dev.inmo.tgbotapi.types.message.content.ContactContent
|
||||
import dev.inmo.tgbotapi.types.message.content.DiceContent
|
||||
import dev.inmo.tgbotapi.types.message.content.DocumentContent
|
||||
@@ -4491,6 +4492,15 @@ public inline fun ResendableContent.audioContentOrThrow(): AudioContent = this a
|
||||
public inline fun <T> ResendableContent.ifAudioContent(block: (AudioContent) -> T): T? =
|
||||
audioContentOrNull() ?.let(block)
|
||||
|
||||
public inline fun ResendableContent.checklistContentOrNull(): ChecklistContent? = this as?
|
||||
dev.inmo.tgbotapi.types.message.content.ChecklistContent
|
||||
|
||||
public inline fun ResendableContent.checklistContentOrThrow(): ChecklistContent = this as
|
||||
dev.inmo.tgbotapi.types.message.content.ChecklistContent
|
||||
|
||||
public inline fun <T> ResendableContent.ifChecklistContent(block: (ChecklistContent) -> T): T? =
|
||||
checklistContentOrNull() ?.let(block)
|
||||
|
||||
public inline fun ResendableContent.contactContentOrNull(): ContactContent? = this as?
|
||||
dev.inmo.tgbotapi.types.message.content.ContactContent
|
||||
|
||||
|
Reference in New Issue
Block a user