diff --git a/CHANGELOG.md b/CHANGELOG.md index ea76dc27e4..4d51604f3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ## 35.0.0 +**THIS UPDATE CONTAINS SUPPORT OF [TELEGRAM BOTS API 10.1](https://core.telegram.org/bots/api-changelog#june-11-2026)** + +* `Core`: + * (`Polls`) Added `Link` type (`dev.inmo.tgbotapi.types.Link`) implementing `PollMedia`, carrying the `url` of a link attached to a poll option + * (`Polls`) Added `link` field parsing to `PollMedia` deserialization/serialization + * (`Polls`) Added `TelegramMediaLink` (`InputMediaLink`) implementing `InputPollOptionMedia`, usable as a poll option media + ## 34.0.0 **THIS UPDATE CONTAINS SUPPORT OF [TELEGRAM BOTS API 10.0](https://core.telegram.org/bots/api-changelog#may-8-2026)** diff --git a/tgbotapi.core/api/tgbotapi.core.api b/tgbotapi.core/api/tgbotapi.core.api index 2d57239186..53efbf6cce 100644 --- a/tgbotapi.core/api/tgbotapi.core.api +++ b/tgbotapi.core/api/tgbotapi.core.api @@ -11224,6 +11224,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt { public static final field limitField Ljava/lang/String; public static final field limitedGiftsField Ljava/lang/String; public static final field linkColorField Ljava/lang/String; + public static final field linkField Ljava/lang/String; public static final field linkPreviewOptionsField Ljava/lang/String; public static final field linkedChatIdField Ljava/lang/String; public static final field livePeriodField Ljava/lang/String; @@ -13752,6 +13753,33 @@ public final class dev/inmo/tgbotapi/types/Level$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class dev/inmo/tgbotapi/types/Link : dev/inmo/tgbotapi/types/media/PollMedia { + public static final field Companion Ldev/inmo/tgbotapi/types/Link$Companion; + public fun (Ljava/lang/String;)V + public final fun component1 ()Ljava/lang/String; + public final fun copy (Ljava/lang/String;)Ldev/inmo/tgbotapi/types/Link; + public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/Link;Ljava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/Link; + public fun equals (Ljava/lang/Object;)Z + public final fun getUrl ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final synthetic class dev/inmo/tgbotapi/types/Link$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/types/Link$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/Link; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/Link;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/types/Link$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + public abstract interface class dev/inmo/tgbotapi/types/LinkPreviewOptions { public static final field Companion Ldev/inmo/tgbotapi/types/LinkPreviewOptions$Companion; public abstract fun getPreferLargeMedia ()Z @@ -24384,23 +24412,25 @@ public final class dev/inmo/tgbotapi/types/media/PollMedia$Serializer : kotlinx/ public final class dev/inmo/tgbotapi/types/media/PollMedia$Serializer$Surrogate { public static final field Companion Ldev/inmo/tgbotapi/types/media/PollMedia$Serializer$Surrogate$Companion; - public synthetic fun (Ldev/inmo/tgbotapi/types/files/AnimationFile;Ldev/inmo/tgbotapi/types/files/AudioFile;Ldev/inmo/tgbotapi/types/files/DocumentFile;Ldev/inmo/tgbotapi/types/files/LivePhotoFile;Ljava/util/List;Ldev/inmo/tgbotapi/types/files/Sticker;Ldev/inmo/tgbotapi/types/files/VideoFile;Ldev/inmo/tgbotapi/types/location/StaticLocation;Ldev/inmo/tgbotapi/types/venue/Venue;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/files/AnimationFile;Ldev/inmo/tgbotapi/types/files/AudioFile;Ldev/inmo/tgbotapi/types/files/DocumentFile;Ldev/inmo/tgbotapi/types/files/LivePhotoFile;Ljava/util/List;Ldev/inmo/tgbotapi/types/files/Sticker;Ldev/inmo/tgbotapi/types/files/VideoFile;Ldev/inmo/tgbotapi/types/location/StaticLocation;Ldev/inmo/tgbotapi/types/venue/Venue;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/files/AnimationFile;Ldev/inmo/tgbotapi/types/files/AudioFile;Ldev/inmo/tgbotapi/types/files/DocumentFile;Ldev/inmo/tgbotapi/types/Link;Ldev/inmo/tgbotapi/types/files/LivePhotoFile;Ljava/util/List;Ldev/inmo/tgbotapi/types/files/Sticker;Ldev/inmo/tgbotapi/types/files/VideoFile;Ldev/inmo/tgbotapi/types/location/StaticLocation;Ldev/inmo/tgbotapi/types/venue/Venue;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/files/AnimationFile;Ldev/inmo/tgbotapi/types/files/AudioFile;Ldev/inmo/tgbotapi/types/files/DocumentFile;Ldev/inmo/tgbotapi/types/Link;Ldev/inmo/tgbotapi/types/files/LivePhotoFile;Ljava/util/List;Ldev/inmo/tgbotapi/types/files/Sticker;Ldev/inmo/tgbotapi/types/files/VideoFile;Ldev/inmo/tgbotapi/types/location/StaticLocation;Ldev/inmo/tgbotapi/types/venue/Venue;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/inmo/tgbotapi/types/files/AnimationFile; + public final fun component10 ()Ldev/inmo/tgbotapi/types/venue/Venue; public final fun component2 ()Ldev/inmo/tgbotapi/types/files/AudioFile; public final fun component3 ()Ldev/inmo/tgbotapi/types/files/DocumentFile; - public final fun component4 ()Ldev/inmo/tgbotapi/types/files/LivePhotoFile; - public final fun component5-oW4O2Ik ()Ljava/util/List; - public final fun component6 ()Ldev/inmo/tgbotapi/types/files/Sticker; - public final fun component7 ()Ldev/inmo/tgbotapi/types/files/VideoFile; - public final fun component8 ()Ldev/inmo/tgbotapi/types/location/StaticLocation; - public final fun component9 ()Ldev/inmo/tgbotapi/types/venue/Venue; - public final fun copy-B73X2Os (Ldev/inmo/tgbotapi/types/files/AnimationFile;Ldev/inmo/tgbotapi/types/files/AudioFile;Ldev/inmo/tgbotapi/types/files/DocumentFile;Ldev/inmo/tgbotapi/types/files/LivePhotoFile;Ljava/util/List;Ldev/inmo/tgbotapi/types/files/Sticker;Ldev/inmo/tgbotapi/types/files/VideoFile;Ldev/inmo/tgbotapi/types/location/StaticLocation;Ldev/inmo/tgbotapi/types/venue/Venue;)Ldev/inmo/tgbotapi/types/media/PollMedia$Serializer$Surrogate; - public static synthetic fun copy-B73X2Os$default (Ldev/inmo/tgbotapi/types/media/PollMedia$Serializer$Surrogate;Ldev/inmo/tgbotapi/types/files/AnimationFile;Ldev/inmo/tgbotapi/types/files/AudioFile;Ldev/inmo/tgbotapi/types/files/DocumentFile;Ldev/inmo/tgbotapi/types/files/LivePhotoFile;Ljava/util/List;Ldev/inmo/tgbotapi/types/files/Sticker;Ldev/inmo/tgbotapi/types/files/VideoFile;Ldev/inmo/tgbotapi/types/location/StaticLocation;Ldev/inmo/tgbotapi/types/venue/Venue;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/media/PollMedia$Serializer$Surrogate; + public final fun component4 ()Ldev/inmo/tgbotapi/types/Link; + public final fun component5 ()Ldev/inmo/tgbotapi/types/files/LivePhotoFile; + public final fun component6-oW4O2Ik ()Ljava/util/List; + public final fun component7 ()Ldev/inmo/tgbotapi/types/files/Sticker; + public final fun component8 ()Ldev/inmo/tgbotapi/types/files/VideoFile; + public final fun component9 ()Ldev/inmo/tgbotapi/types/location/StaticLocation; + public final fun copy-psFI_B0 (Ldev/inmo/tgbotapi/types/files/AnimationFile;Ldev/inmo/tgbotapi/types/files/AudioFile;Ldev/inmo/tgbotapi/types/files/DocumentFile;Ldev/inmo/tgbotapi/types/Link;Ldev/inmo/tgbotapi/types/files/LivePhotoFile;Ljava/util/List;Ldev/inmo/tgbotapi/types/files/Sticker;Ldev/inmo/tgbotapi/types/files/VideoFile;Ldev/inmo/tgbotapi/types/location/StaticLocation;Ldev/inmo/tgbotapi/types/venue/Venue;)Ldev/inmo/tgbotapi/types/media/PollMedia$Serializer$Surrogate; + public static synthetic fun copy-psFI_B0$default (Ldev/inmo/tgbotapi/types/media/PollMedia$Serializer$Surrogate;Ldev/inmo/tgbotapi/types/files/AnimationFile;Ldev/inmo/tgbotapi/types/files/AudioFile;Ldev/inmo/tgbotapi/types/files/DocumentFile;Ldev/inmo/tgbotapi/types/Link;Ldev/inmo/tgbotapi/types/files/LivePhotoFile;Ljava/util/List;Ldev/inmo/tgbotapi/types/files/Sticker;Ldev/inmo/tgbotapi/types/files/VideoFile;Ldev/inmo/tgbotapi/types/location/StaticLocation;Ldev/inmo/tgbotapi/types/venue/Venue;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/media/PollMedia$Serializer$Surrogate; public fun equals (Ljava/lang/Object;)Z public final fun getAnimation ()Ldev/inmo/tgbotapi/types/files/AnimationFile; public final fun getAudio ()Ldev/inmo/tgbotapi/types/files/AudioFile; public final fun getDocument ()Ldev/inmo/tgbotapi/types/files/DocumentFile; + public final fun getLink ()Ldev/inmo/tgbotapi/types/Link; public final fun getLivePhoto ()Ldev/inmo/tgbotapi/types/files/LivePhotoFile; public final fun getLocation ()Ldev/inmo/tgbotapi/types/location/StaticLocation; public final fun getPhoto-oW4O2Ik ()Ljava/util/List; @@ -24607,6 +24637,35 @@ public final class dev/inmo/tgbotapi/types/media/TelegramMediaDocumentKt { public static synthetic fun toTelegramMediaDocument$default (Ldev/inmo/tgbotapi/types/files/DocumentFile;Ljava/util/List;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/media/TelegramMediaDocument; } +public final class dev/inmo/tgbotapi/types/media/TelegramMediaLink : dev/inmo/tgbotapi/types/media/InputPollOptionMedia { + public static final field Companion Ldev/inmo/tgbotapi/types/media/TelegramMediaLink$Companion; + public static final field TYPE Ljava/lang/String; + public fun (Ljava/lang/String;)V + public final fun component1 ()Ljava/lang/String; + public final fun copy (Ljava/lang/String;)Ldev/inmo/tgbotapi/types/media/TelegramMediaLink; + public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/media/TelegramMediaLink;Ljava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/media/TelegramMediaLink; + public fun equals (Ljava/lang/Object;)Z + public fun getType ()Ljava/lang/String; + public final fun getUrl ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final synthetic class dev/inmo/tgbotapi/types/media/TelegramMediaLink$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/types/media/TelegramMediaLink$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/media/TelegramMediaLink; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/media/TelegramMediaLink;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/types/media/TelegramMediaLink$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + public final class dev/inmo/tgbotapi/types/media/TelegramMediaLivePhoto : dev/inmo/tgbotapi/types/media/InputPollMedia, dev/inmo/tgbotapi/types/media/InputPollOptionMedia, dev/inmo/tgbotapi/types/media/TelegramFreeMedia, dev/inmo/tgbotapi/types/media/VisualMediaGroupMemberTelegramMedia { public static final field Companion Ldev/inmo/tgbotapi/types/media/TelegramMediaLivePhoto$Companion; public static final field TYPE Ljava/lang/String; diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt index 859984e9dd..b338f45c2f 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt @@ -556,6 +556,7 @@ const val stickerField = "sticker" const val oldStickerField = "old_sticker" const val keywordsField = "keywords" const val urlField = "url" +const val linkField = "link" const val addressField = "address" const val actionField = "action" const val positionField = "position" diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Link.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Link.kt new file mode 100644 index 0000000000..9187e096cb --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Link.kt @@ -0,0 +1,16 @@ +package dev.inmo.tgbotapi.types + +import dev.inmo.tgbotapi.types.media.PollMedia +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +/** + * Represents an HTTP link. + * + * @see Link + */ +@Serializable +data class Link( + @SerialName(urlField) + val url: String +) : PollMedia diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/media/InputPollOptionMedia.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/media/InputPollOptionMedia.kt index 42279618dc..861654e3ca 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/media/InputPollOptionMedia.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/media/InputPollOptionMedia.kt @@ -27,6 +27,7 @@ object InputPollOptionMediaSerializer : KSerializer { override fun serialize(encoder: Encoder, value: InputPollOptionMedia) { when (value) { is TelegramMediaAnimation -> TelegramMediaAnimation.serializer().serialize(encoder, value) + is TelegramMediaLink -> TelegramMediaLink.serializer().serialize(encoder, value) is TelegramMediaLivePhoto -> TelegramMediaLivePhoto.serializer().serialize(encoder, value) is TelegramMediaLocation -> TelegramMediaLocation.serializer().serialize(encoder, value) is TelegramMediaPhoto -> TelegramMediaPhoto.serializer().serialize(encoder, value) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/media/PollMedia.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/media/PollMedia.kt index 2c9af7f97f..e80bc2428d 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/media/PollMedia.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/media/PollMedia.kt @@ -10,6 +10,8 @@ import dev.inmo.tgbotapi.types.files.LivePhotoFile import dev.inmo.tgbotapi.types.files.PhotoFile import dev.inmo.tgbotapi.types.files.Sticker import dev.inmo.tgbotapi.types.files.VideoFile +import dev.inmo.tgbotapi.types.Link +import dev.inmo.tgbotapi.types.linkField import dev.inmo.tgbotapi.types.livePhotoField import dev.inmo.tgbotapi.types.location.StaticLocation import dev.inmo.tgbotapi.types.locationField @@ -36,6 +38,8 @@ interface PollMedia : BaseTelegramMediaFile { val audio: AudioFile? = null, @SerialName(documentField) val document: DocumentFile? = null, + @SerialName(linkField) + val link: Link? = null, @SerialName(livePhotoField) val livePhoto: LivePhotoFile? = null, @SerialName(photoField) @@ -61,6 +65,7 @@ interface PollMedia : BaseTelegramMediaFile { surrogate.animation != null -> surrogate.animation surrogate.audio != null -> surrogate.audio surrogate.document != null -> surrogate.document + surrogate.link != null -> surrogate.link surrogate.livePhoto != null -> surrogate.livePhoto surrogate.photo != null -> surrogate.photo surrogate.sticker != null -> surrogate.sticker @@ -76,6 +81,7 @@ interface PollMedia : BaseTelegramMediaFile { animation = value as? AnimationFile, audio = value as? AudioFile, document = value as? DocumentFile, + link = value as? Link, livePhoto = value as? LivePhotoFile, photo = value as? PhotoFile, sticker = value as? Sticker, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/media/TelegramMediaLink.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/media/TelegramMediaLink.kt new file mode 100644 index 0000000000..cb71452196 --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/media/TelegramMediaLink.kt @@ -0,0 +1,26 @@ +package dev.inmo.tgbotapi.types.media + +import dev.inmo.tgbotapi.types.typeField +import dev.inmo.tgbotapi.types.urlField +import kotlinx.serialization.EncodeDefault +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +/** + * Represents an HTTP link to be sent. Can be used as [InputPollOptionMedia]. + * + * @see InputMediaLink + */ +@Serializable +data class TelegramMediaLink( + @SerialName(urlField) + val url: String, +) : InputPollOptionMedia { + @EncodeDefault + @SerialName(typeField) + override val type: String = TYPE + + companion object { + const val TYPE = "link" + } +} diff --git a/tgbotapi.utils/api/tgbotapi.utils.api b/tgbotapi.utils/api/tgbotapi.utils.api index 7c0e91d4c4..f6a5c407e5 100644 --- a/tgbotapi.utils/api/tgbotapi.utils.api +++ b/tgbotapi.utils/api/tgbotapi.utils.api @@ -1918,6 +1918,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt { public static final fun ifLeftChatMember (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifLeftChatMemberEvent (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifLeftChatMemberEvent (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; + public static final fun ifLink (Ldev/inmo/tgbotapi/types/media/BaseTelegramMediaFile;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifLiveLocation (Ldev/inmo/tgbotapi/types/location/Location;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifLiveLocationContent (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifLivePhotoContent (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; @@ -2142,6 +2143,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt { public static final fun ifTelegramMediaDocument (Ldev/inmo/tgbotapi/types/media/InputPollMedia;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifTelegramMediaDocument (Ldev/inmo/tgbotapi/types/media/TelegramMedia;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifTelegramMediaFile (Ldev/inmo/tgbotapi/types/media/BaseTelegramMediaFile;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; + public static final fun ifTelegramMediaLink (Ldev/inmo/tgbotapi/types/media/InputPollOptionMedia;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifTelegramMediaLivePhoto (Ldev/inmo/tgbotapi/types/media/InputPollMedia;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifTelegramMediaLivePhoto (Ldev/inmo/tgbotapi/types/media/InputPollOptionMedia;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifTelegramMediaLivePhoto (Ldev/inmo/tgbotapi/types/media/TelegramMedia;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; @@ -2364,6 +2366,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt { public static final fun leftChatMemberEventOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/LeftChatMemberEvent; public static final fun leftChatMemberOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/chat/member/LeftChatMember; public static final fun leftChatMemberOrThrow (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/chat/member/LeftChatMember; + public static final fun linkOrNull (Ldev/inmo/tgbotapi/types/media/BaseTelegramMediaFile;)Ldev/inmo/tgbotapi/types/Link; + public static final fun linkOrThrow (Ldev/inmo/tgbotapi/types/media/BaseTelegramMediaFile;)Ldev/inmo/tgbotapi/types/Link; public static final fun liveLocationContentOrNull (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/LiveLocationContent; public static final fun liveLocationContentOrThrow (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/LiveLocationContent; public static final fun liveLocationOrNull (Ldev/inmo/tgbotapi/types/location/Location;)Ldev/inmo/tgbotapi/types/location/LiveLocation; @@ -2812,6 +2816,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt { public static final fun telegramMediaDocumentOrThrow (Ldev/inmo/tgbotapi/types/media/TelegramMedia;)Ldev/inmo/tgbotapi/types/media/TelegramMediaDocument; public static final fun telegramMediaFileOrNull (Ldev/inmo/tgbotapi/types/media/BaseTelegramMediaFile;)Ldev/inmo/tgbotapi/types/files/TelegramMediaFile; public static final fun telegramMediaFileOrThrow (Ldev/inmo/tgbotapi/types/media/BaseTelegramMediaFile;)Ldev/inmo/tgbotapi/types/files/TelegramMediaFile; + public static final fun telegramMediaLinkOrNull (Ldev/inmo/tgbotapi/types/media/InputPollOptionMedia;)Ldev/inmo/tgbotapi/types/media/TelegramMediaLink; + public static final fun telegramMediaLinkOrThrow (Ldev/inmo/tgbotapi/types/media/InputPollOptionMedia;)Ldev/inmo/tgbotapi/types/media/TelegramMediaLink; public static final fun telegramMediaLivePhotoOrNull (Ldev/inmo/tgbotapi/types/media/InputPollMedia;)Ldev/inmo/tgbotapi/types/media/TelegramMediaLivePhoto; public static final fun telegramMediaLivePhotoOrNull (Ldev/inmo/tgbotapi/types/media/InputPollOptionMedia;)Ldev/inmo/tgbotapi/types/media/TelegramMediaLivePhoto; public static final fun telegramMediaLivePhotoOrNull (Ldev/inmo/tgbotapi/types/media/TelegramMedia;)Ldev/inmo/tgbotapi/types/media/TelegramMediaLivePhoto; diff --git a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCastsNew.kt b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCastsNew.kt index 7468a9e171..d6cb71dfef 100644 --- a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCastsNew.kt +++ b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCastsNew.kt @@ -95,6 +95,7 @@ import dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputVenueMessa import dev.inmo.tgbotapi.types.InlineQueries.query.BaseInlineQuery import dev.inmo.tgbotapi.types.InlineQueries.query.InlineQuery import dev.inmo.tgbotapi.types.InlineQueries.query.LocationInlineQuery +import dev.inmo.tgbotapi.types.Link import dev.inmo.tgbotapi.types.PaidMessagePriceChanged import dev.inmo.tgbotapi.types.PrimaryInviteLink import dev.inmo.tgbotapi.types.ReplyInfo @@ -267,6 +268,7 @@ import dev.inmo.tgbotapi.types.media.TelegramMedia import dev.inmo.tgbotapi.types.media.TelegramMediaAnimation import dev.inmo.tgbotapi.types.media.TelegramMediaAudio import dev.inmo.tgbotapi.types.media.TelegramMediaDocument +import dev.inmo.tgbotapi.types.media.TelegramMediaLink import dev.inmo.tgbotapi.types.media.TelegramMediaLivePhoto import dev.inmo.tgbotapi.types.media.TelegramMediaLocation import dev.inmo.tgbotapi.types.media.TelegramMediaPhoto @@ -580,6 +582,102 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.types.venue.Venue import kotlin.Suppress +public inline fun BotException.commonBotExceptionOrNull(): CommonBotException? = this as? dev.inmo.tgbotapi.bot.exceptions.CommonBotException + +public inline fun BotException.commonBotExceptionOrThrow(): CommonBotException = this as dev.inmo.tgbotapi.bot.exceptions.CommonBotException + +public inline fun BotException.ifCommonBotException(block: (CommonBotException) -> T): T? = commonBotExceptionOrNull() ?.let(block) + +public inline fun BotException.apiExceptionOrNull(): ApiException? = this as? dev.inmo.tgbotapi.bot.exceptions.ApiException + +public inline fun BotException.apiExceptionOrThrow(): ApiException = this as dev.inmo.tgbotapi.bot.exceptions.ApiException + +public inline fun BotException.ifApiException(block: (ApiException) -> T): T? = apiExceptionOrNull() ?.let(block) + +public inline fun BotException.requestExceptionOrNull(): RequestException? = this as? dev.inmo.tgbotapi.bot.exceptions.RequestException + +public inline fun BotException.requestExceptionOrThrow(): RequestException = this as dev.inmo.tgbotapi.bot.exceptions.RequestException + +public inline fun BotException.ifRequestException(block: (RequestException) -> T): T? = requestExceptionOrNull() ?.let(block) + +public inline fun BotException.commonRequestExceptionOrNull(): CommonRequestException? = this as? dev.inmo.tgbotapi.bot.exceptions.CommonRequestException + +public inline fun BotException.commonRequestExceptionOrThrow(): CommonRequestException = this as dev.inmo.tgbotapi.bot.exceptions.CommonRequestException + +public inline fun BotException.ifCommonRequestException(block: (CommonRequestException) -> T): T? = commonRequestExceptionOrNull() ?.let(block) + +public inline fun BotException.unauthorizedExceptionOrNull(): UnauthorizedException? = this as? dev.inmo.tgbotapi.bot.exceptions.UnauthorizedException + +public inline fun BotException.unauthorizedExceptionOrThrow(): UnauthorizedException = this as dev.inmo.tgbotapi.bot.exceptions.UnauthorizedException + +public inline fun BotException.ifUnauthorizedException(block: (UnauthorizedException) -> T): T? = unauthorizedExceptionOrNull() ?.let(block) + +public inline fun BotException.replyMessageNotFoundExceptionOrNull(): ReplyMessageNotFoundException? = this as? dev.inmo.tgbotapi.bot.exceptions.ReplyMessageNotFoundException + +public inline fun BotException.replyMessageNotFoundExceptionOrThrow(): ReplyMessageNotFoundException = this as dev.inmo.tgbotapi.bot.exceptions.ReplyMessageNotFoundException + +public inline fun BotException.ifReplyMessageNotFoundException(block: (ReplyMessageNotFoundException) -> T): T? = replyMessageNotFoundExceptionOrNull() ?.let(block) + +public inline fun BotException.messageIsNotModifiedExceptionOrNull(): MessageIsNotModifiedException? = this as? dev.inmo.tgbotapi.bot.exceptions.MessageIsNotModifiedException + +public inline fun BotException.messageIsNotModifiedExceptionOrThrow(): MessageIsNotModifiedException = this as dev.inmo.tgbotapi.bot.exceptions.MessageIsNotModifiedException + +public inline fun BotException.ifMessageIsNotModifiedException(block: (MessageIsNotModifiedException) -> T): T? = messageIsNotModifiedExceptionOrNull() ?.let(block) + +public inline fun BotException.messageToEditNotFoundExceptionOrNull(): MessageToEditNotFoundException? = this as? dev.inmo.tgbotapi.bot.exceptions.MessageToEditNotFoundException + +public inline fun BotException.messageToEditNotFoundExceptionOrThrow(): MessageToEditNotFoundException = this as dev.inmo.tgbotapi.bot.exceptions.MessageToEditNotFoundException + +public inline fun BotException.ifMessageToEditNotFoundException(block: (MessageToEditNotFoundException) -> T): T? = messageToEditNotFoundExceptionOrNull() ?.let(block) + +public inline fun BotException.invalidPhotoDimensionsExceptionOrNull(): InvalidPhotoDimensionsException? = this as? dev.inmo.tgbotapi.bot.exceptions.InvalidPhotoDimensionsException + +public inline fun BotException.invalidPhotoDimensionsExceptionOrThrow(): InvalidPhotoDimensionsException = this as dev.inmo.tgbotapi.bot.exceptions.InvalidPhotoDimensionsException + +public inline fun BotException.ifInvalidPhotoDimensionsException(block: (InvalidPhotoDimensionsException) -> T): T? = invalidPhotoDimensionsExceptionOrNull() ?.let(block) + +public inline fun BotException.wrongFileIdentifierExceptionOrNull(): WrongFileIdentifierException? = this as? dev.inmo.tgbotapi.bot.exceptions.WrongFileIdentifierException + +public inline fun BotException.wrongFileIdentifierExceptionOrThrow(): WrongFileIdentifierException = this as dev.inmo.tgbotapi.bot.exceptions.WrongFileIdentifierException + +public inline fun BotException.ifWrongFileIdentifierException(block: (WrongFileIdentifierException) -> T): T? = wrongFileIdentifierExceptionOrNull() ?.let(block) + +public inline fun BotException.tooMuchRequestsExceptionOrNull(): TooMuchRequestsException? = this as? dev.inmo.tgbotapi.bot.exceptions.TooMuchRequestsException + +public inline fun BotException.tooMuchRequestsExceptionOrThrow(): TooMuchRequestsException = this as dev.inmo.tgbotapi.bot.exceptions.TooMuchRequestsException + +public inline fun BotException.ifTooMuchRequestsException(block: (TooMuchRequestsException) -> T): T? = tooMuchRequestsExceptionOrNull() ?.let(block) + +public inline fun BotException.getUpdatesConflictOrNull(): GetUpdatesConflict? = this as? dev.inmo.tgbotapi.bot.exceptions.GetUpdatesConflict + +public inline fun BotException.getUpdatesConflictOrThrow(): GetUpdatesConflict = this as dev.inmo.tgbotapi.bot.exceptions.GetUpdatesConflict + +public inline fun BotException.ifGetUpdatesConflict(block: (GetUpdatesConflict) -> T): T? = getUpdatesConflictOrNull() ?.let(block) + +public inline fun BotException.commonBotExceptionDefaultOrNull(): CommonBotException.Default? = this as? dev.inmo.tgbotapi.bot.exceptions.CommonBotException.Default + +public inline fun BotException.commonBotExceptionDefaultOrThrow(): CommonBotException.Default = this as dev.inmo.tgbotapi.bot.exceptions.CommonBotException.Default + +public inline fun BotException.ifCommonBotExceptionDefault(block: (CommonBotException.Default) -> T): T? = commonBotExceptionDefaultOrNull() ?.let(block) + +public inline fun InlineQueryResultsButton.webAppOrNull(): InlineQueryResultsButton.WebApp? = this as? dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton.WebApp + +public inline fun InlineQueryResultsButton.webAppOrThrow(): InlineQueryResultsButton.WebApp = this as dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton.WebApp + +public inline fun InlineQueryResultsButton.ifWebApp(block: (InlineQueryResultsButton.WebApp) -> T): T? = webAppOrNull() ?.let(block) + +public inline fun InlineQueryResultsButton.startOrNull(): InlineQueryResultsButton.Start? = this as? dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton.Start + +public inline fun InlineQueryResultsButton.startOrThrow(): InlineQueryResultsButton.Start = this as dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton.Start + +public inline fun InlineQueryResultsButton.ifStart(block: (InlineQueryResultsButton.Start) -> T): T? = startOrNull() ?.let(block) + +public inline fun InlineQueryResultsButton.unknownOrNull(): InlineQueryResultsButton.Unknown? = this as? dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton.Unknown + +public inline fun InlineQueryResultsButton.unknownOrThrow(): InlineQueryResultsButton.Unknown = this as dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton.Unknown + +public inline fun InlineQueryResultsButton.ifUnknown(block: (InlineQueryResultsButton.Unknown) -> T): T? = unknownOrNull() ?.let(block) + public inline fun InputSticker.maskOrNull(): InputSticker.Mask? = this as? dev.inmo.tgbotapi.requests.stickers.InputSticker.Mask public inline fun InputSticker.maskOrThrow(): InputSticker.Mask = this as dev.inmo.tgbotapi.requests.stickers.InputSticker.Mask @@ -604,23 +702,545 @@ public inline fun InputSticker.withKeywordsCustomEmojiOrThrow(): InputSticker.Wi public inline fun InputSticker.ifWithKeywordsCustomEmoji(block: (InputSticker.WithKeywords.CustomEmoji) -> T): T? = withKeywordsCustomEmojiOrNull() ?.let(block) -public inline fun InlineQueryResultsButton.webAppOrNull(): InlineQueryResultsButton.WebApp? = this as? dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton.WebApp +public inline fun InputPollMedia.telegramMediaPhotoOrNull(): TelegramMediaPhoto? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaPhoto -public inline fun InlineQueryResultsButton.webAppOrThrow(): InlineQueryResultsButton.WebApp = this as dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton.WebApp +public inline fun InputPollMedia.telegramMediaPhotoOrThrow(): TelegramMediaPhoto = this as dev.inmo.tgbotapi.types.media.TelegramMediaPhoto -public inline fun InlineQueryResultsButton.ifWebApp(block: (InlineQueryResultsButton.WebApp) -> T): T? = webAppOrNull() ?.let(block) +public inline fun InputPollMedia.ifTelegramMediaPhoto(block: (TelegramMediaPhoto) -> T): T? = telegramMediaPhotoOrNull() ?.let(block) -public inline fun InlineQueryResultsButton.startOrNull(): InlineQueryResultsButton.Start? = this as? dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton.Start +public inline fun InputPollMedia.telegramMediaDocumentOrNull(): TelegramMediaDocument? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaDocument -public inline fun InlineQueryResultsButton.startOrThrow(): InlineQueryResultsButton.Start = this as dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton.Start +public inline fun InputPollMedia.telegramMediaDocumentOrThrow(): TelegramMediaDocument = this as dev.inmo.tgbotapi.types.media.TelegramMediaDocument -public inline fun InlineQueryResultsButton.ifStart(block: (InlineQueryResultsButton.Start) -> T): T? = startOrNull() ?.let(block) +public inline fun InputPollMedia.ifTelegramMediaDocument(block: (TelegramMediaDocument) -> T): T? = telegramMediaDocumentOrNull() ?.let(block) -public inline fun InlineQueryResultsButton.unknownOrNull(): InlineQueryResultsButton.Unknown? = this as? dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton.Unknown +public inline fun InputPollMedia.telegramMediaVenueOrNull(): TelegramMediaVenue? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaVenue -public inline fun InlineQueryResultsButton.unknownOrThrow(): InlineQueryResultsButton.Unknown = this as dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton.Unknown +public inline fun InputPollMedia.telegramMediaVenueOrThrow(): TelegramMediaVenue = this as dev.inmo.tgbotapi.types.media.TelegramMediaVenue -public inline fun InlineQueryResultsButton.ifUnknown(block: (InlineQueryResultsButton.Unknown) -> T): T? = unknownOrNull() ?.let(block) +public inline fun InputPollMedia.ifTelegramMediaVenue(block: (TelegramMediaVenue) -> T): T? = telegramMediaVenueOrNull() ?.let(block) + +public inline fun InputPollMedia.telegramMediaLocationOrNull(): TelegramMediaLocation? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaLocation + +public inline fun InputPollMedia.telegramMediaLocationOrThrow(): TelegramMediaLocation = this as dev.inmo.tgbotapi.types.media.TelegramMediaLocation + +public inline fun InputPollMedia.ifTelegramMediaLocation(block: (TelegramMediaLocation) -> T): T? = telegramMediaLocationOrNull() ?.let(block) + +public inline fun InputPollMedia.telegramMediaAudioOrNull(): TelegramMediaAudio? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaAudio + +public inline fun InputPollMedia.telegramMediaAudioOrThrow(): TelegramMediaAudio = this as dev.inmo.tgbotapi.types.media.TelegramMediaAudio + +public inline fun InputPollMedia.ifTelegramMediaAudio(block: (TelegramMediaAudio) -> T): T? = telegramMediaAudioOrNull() ?.let(block) + +public inline fun InputPollMedia.telegramMediaLivePhotoOrNull(): TelegramMediaLivePhoto? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaLivePhoto + +public inline fun InputPollMedia.telegramMediaLivePhotoOrThrow(): TelegramMediaLivePhoto = this as dev.inmo.tgbotapi.types.media.TelegramMediaLivePhoto + +public inline fun InputPollMedia.ifTelegramMediaLivePhoto(block: (TelegramMediaLivePhoto) -> T): T? = telegramMediaLivePhotoOrNull() ?.let(block) + +public inline fun InputPollMedia.telegramMediaAnimationOrNull(): TelegramMediaAnimation? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaAnimation + +public inline fun InputPollMedia.telegramMediaAnimationOrThrow(): TelegramMediaAnimation = this as dev.inmo.tgbotapi.types.media.TelegramMediaAnimation + +public inline fun InputPollMedia.ifTelegramMediaAnimation(block: (TelegramMediaAnimation) -> T): T? = telegramMediaAnimationOrNull() ?.let(block) + +public inline fun InputPollMedia.telegramMediaVideoOrNull(): TelegramMediaVideo? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaVideo + +public inline fun InputPollMedia.telegramMediaVideoOrThrow(): TelegramMediaVideo = this as dev.inmo.tgbotapi.types.media.TelegramMediaVideo + +public inline fun InputPollMedia.ifTelegramMediaVideo(block: (TelegramMediaVideo) -> T): T? = telegramMediaVideoOrNull() ?.let(block) + +public inline fun TelegramMedia.telegramPaidMediaOrNull(): TelegramPaidMedia? = this as? dev.inmo.tgbotapi.types.media.TelegramPaidMedia + +public inline fun TelegramMedia.telegramPaidMediaOrThrow(): TelegramPaidMedia = this as dev.inmo.tgbotapi.types.media.TelegramPaidMedia + +public inline fun TelegramMedia.ifTelegramPaidMedia(block: (TelegramPaidMedia) -> T): T? = telegramPaidMediaOrNull() ?.let(block) + +public inline fun TelegramMedia.visualTelegramPaidMediaOrNull(): VisualTelegramPaidMedia? = this as? dev.inmo.tgbotapi.types.media.VisualTelegramPaidMedia + +public inline fun TelegramMedia.visualTelegramPaidMediaOrThrow(): VisualTelegramPaidMedia = this as dev.inmo.tgbotapi.types.media.VisualTelegramPaidMedia + +public inline fun TelegramMedia.ifVisualTelegramPaidMedia(block: (VisualTelegramPaidMedia) -> T): T? = visualTelegramPaidMediaOrNull() ?.let(block) + +public inline fun TelegramMedia.thumbedTelegramMediaOrNull(): ThumbedTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.ThumbedTelegramMedia + +public inline fun TelegramMedia.thumbedTelegramMediaOrThrow(): ThumbedTelegramMedia = this as dev.inmo.tgbotapi.types.media.ThumbedTelegramMedia + +public inline fun TelegramMedia.ifThumbedTelegramMedia(block: (ThumbedTelegramMedia) -> T): T? = thumbedTelegramMediaOrNull() ?.let(block) + +public inline fun TelegramMedia.telegramPaidMediaVideoOrNull(): TelegramPaidMediaVideo? = this as? dev.inmo.tgbotapi.types.media.TelegramPaidMediaVideo + +public inline fun TelegramMedia.telegramPaidMediaVideoOrThrow(): TelegramPaidMediaVideo = this as dev.inmo.tgbotapi.types.media.TelegramPaidMediaVideo + +public inline fun TelegramMedia.ifTelegramPaidMediaVideo(block: (TelegramPaidMediaVideo) -> T): T? = telegramPaidMediaVideoOrNull() ?.let(block) + +public inline fun TelegramMedia.spoilerableTelegramMediaOrNull(): SpoilerableTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.SpoilerableTelegramMedia + +public inline fun TelegramMedia.spoilerableTelegramMediaOrThrow(): SpoilerableTelegramMedia = this as dev.inmo.tgbotapi.types.media.SpoilerableTelegramMedia + +public inline fun TelegramMedia.ifSpoilerableTelegramMedia(block: (SpoilerableTelegramMedia) -> T): T? = spoilerableTelegramMediaOrNull() ?.let(block) + +public inline fun TelegramMedia.telegramPaidMediaPhotoOrNull(): TelegramPaidMediaPhoto? = this as? dev.inmo.tgbotapi.types.media.TelegramPaidMediaPhoto + +public inline fun TelegramMedia.telegramPaidMediaPhotoOrThrow(): TelegramPaidMediaPhoto = this as dev.inmo.tgbotapi.types.media.TelegramPaidMediaPhoto + +public inline fun TelegramMedia.ifTelegramPaidMediaPhoto(block: (TelegramPaidMediaPhoto) -> T): T? = telegramPaidMediaPhotoOrNull() ?.let(block) + +public inline fun TelegramMedia.telegramMediaPhotoOrNull(): TelegramMediaPhoto? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaPhoto + +public inline fun TelegramMedia.telegramMediaPhotoOrThrow(): TelegramMediaPhoto = this as dev.inmo.tgbotapi.types.media.TelegramMediaPhoto + +public inline fun TelegramMedia.ifTelegramMediaPhoto(block: (TelegramMediaPhoto) -> T): T? = telegramMediaPhotoOrNull() ?.let(block) + +public inline fun TelegramMedia.telegramMediaDocumentOrNull(): TelegramMediaDocument? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaDocument + +public inline fun TelegramMedia.telegramMediaDocumentOrThrow(): TelegramMediaDocument = this as dev.inmo.tgbotapi.types.media.TelegramMediaDocument + +public inline fun TelegramMedia.ifTelegramMediaDocument(block: (TelegramMediaDocument) -> T): T? = telegramMediaDocumentOrNull() ?.let(block) + +public inline fun TelegramMedia.sizedTelegramMediaOrNull(): SizedTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.SizedTelegramMedia + +public inline fun TelegramMedia.sizedTelegramMediaOrThrow(): SizedTelegramMedia = this as dev.inmo.tgbotapi.types.media.SizedTelegramMedia + +public inline fun TelegramMedia.ifSizedTelegramMedia(block: (SizedTelegramMedia) -> T): T? = sizedTelegramMediaOrNull() ?.let(block) + +public inline fun TelegramMedia.telegramFreeMediaOrNull(): TelegramFreeMedia? = this as? dev.inmo.tgbotapi.types.media.TelegramFreeMedia + +public inline fun TelegramMedia.telegramFreeMediaOrThrow(): TelegramFreeMedia = this as dev.inmo.tgbotapi.types.media.TelegramFreeMedia + +public inline fun TelegramMedia.ifTelegramFreeMedia(block: (TelegramFreeMedia) -> T): T? = telegramFreeMediaOrNull() ?.let(block) + +public inline fun TelegramMedia.telegramMediaStickerOrNull(): TelegramMediaSticker? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaSticker + +public inline fun TelegramMedia.telegramMediaStickerOrThrow(): TelegramMediaSticker = this as dev.inmo.tgbotapi.types.media.TelegramMediaSticker + +public inline fun TelegramMedia.ifTelegramMediaSticker(block: (TelegramMediaSticker) -> T): T? = telegramMediaStickerOrNull() ?.let(block) + +public inline fun TelegramMedia.telegramMediaAudioOrNull(): TelegramMediaAudio? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaAudio + +public inline fun TelegramMedia.telegramMediaAudioOrThrow(): TelegramMediaAudio = this as dev.inmo.tgbotapi.types.media.TelegramMediaAudio + +public inline fun TelegramMedia.ifTelegramMediaAudio(block: (TelegramMediaAudio) -> T): T? = telegramMediaAudioOrNull() ?.let(block) + +public inline fun TelegramMedia.duratedTelegramMediaOrNull(): DuratedTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.DuratedTelegramMedia + +public inline fun TelegramMedia.duratedTelegramMediaOrThrow(): DuratedTelegramMedia = this as dev.inmo.tgbotapi.types.media.DuratedTelegramMedia + +public inline fun TelegramMedia.ifDuratedTelegramMedia(block: (DuratedTelegramMedia) -> T): T? = duratedTelegramMediaOrNull() ?.let(block) + +public inline fun TelegramMedia.titledTelegramMediaOrNull(): TitledTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.TitledTelegramMedia + +public inline fun TelegramMedia.titledTelegramMediaOrThrow(): TitledTelegramMedia = this as dev.inmo.tgbotapi.types.media.TitledTelegramMedia + +public inline fun TelegramMedia.ifTitledTelegramMedia(block: (TitledTelegramMedia) -> T): T? = titledTelegramMediaOrNull() ?.let(block) + +public inline fun TelegramMedia.telegramPaidMediaLivePhotoOrNull(): TelegramPaidMediaLivePhoto? = this as? dev.inmo.tgbotapi.types.media.TelegramPaidMediaLivePhoto + +public inline fun TelegramMedia.telegramPaidMediaLivePhotoOrThrow(): TelegramPaidMediaLivePhoto = this as dev.inmo.tgbotapi.types.media.TelegramPaidMediaLivePhoto + +public inline fun TelegramMedia.ifTelegramPaidMediaLivePhoto(block: (TelegramPaidMediaLivePhoto) -> T): T? = telegramPaidMediaLivePhotoOrNull() ?.let(block) + +public inline fun TelegramMedia.telegramMediaLivePhotoOrNull(): TelegramMediaLivePhoto? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaLivePhoto + +public inline fun TelegramMedia.telegramMediaLivePhotoOrThrow(): TelegramMediaLivePhoto = this as dev.inmo.tgbotapi.types.media.TelegramMediaLivePhoto + +public inline fun TelegramMedia.ifTelegramMediaLivePhoto(block: (TelegramMediaLivePhoto) -> T): T? = telegramMediaLivePhotoOrNull() ?.let(block) + +public inline fun TelegramMedia.withCustomStartTelegramMediaOrNull(): WithCustomStartTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.WithCustomStartTelegramMedia + +public inline fun TelegramMedia.withCustomStartTelegramMediaOrThrow(): WithCustomStartTelegramMedia = this as dev.inmo.tgbotapi.types.media.WithCustomStartTelegramMedia + +public inline fun TelegramMedia.ifWithCustomStartTelegramMedia(block: (WithCustomStartTelegramMedia) -> T): T? = withCustomStartTelegramMediaOrNull() ?.let(block) + +public inline fun TelegramMedia.mediaGroupMemberTelegramMediaOrNull(): MediaGroupMemberTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.MediaGroupMemberTelegramMedia + +public inline fun TelegramMedia.mediaGroupMemberTelegramMediaOrThrow(): MediaGroupMemberTelegramMedia = this as dev.inmo.tgbotapi.types.media.MediaGroupMemberTelegramMedia + +public inline fun TelegramMedia.ifMediaGroupMemberTelegramMedia(block: (MediaGroupMemberTelegramMedia) -> T): T? = mediaGroupMemberTelegramMediaOrNull() ?.let(block) + +public inline fun TelegramMedia.audioMediaGroupMemberTelegramMediaOrNull(): AudioMediaGroupMemberTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.AudioMediaGroupMemberTelegramMedia + +public inline fun TelegramMedia.audioMediaGroupMemberTelegramMediaOrThrow(): AudioMediaGroupMemberTelegramMedia = this as dev.inmo.tgbotapi.types.media.AudioMediaGroupMemberTelegramMedia + +public inline fun TelegramMedia.ifAudioMediaGroupMemberTelegramMedia(block: (AudioMediaGroupMemberTelegramMedia) -> T): T? = audioMediaGroupMemberTelegramMediaOrNull() ?.let(block) + +public inline fun TelegramMedia.documentMediaGroupMemberTelegramMediaOrNull(): DocumentMediaGroupMemberTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.DocumentMediaGroupMemberTelegramMedia + +public inline fun TelegramMedia.documentMediaGroupMemberTelegramMediaOrThrow(): DocumentMediaGroupMemberTelegramMedia = this as dev.inmo.tgbotapi.types.media.DocumentMediaGroupMemberTelegramMedia + +public inline fun TelegramMedia.ifDocumentMediaGroupMemberTelegramMedia(block: (DocumentMediaGroupMemberTelegramMedia) -> T): T? = documentMediaGroupMemberTelegramMediaOrNull() ?.let(block) + +public inline fun TelegramMedia.visualMediaGroupMemberTelegramMediaOrNull(): VisualMediaGroupMemberTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.VisualMediaGroupMemberTelegramMedia + +public inline fun TelegramMedia.visualMediaGroupMemberTelegramMediaOrThrow(): VisualMediaGroupMemberTelegramMedia = this as dev.inmo.tgbotapi.types.media.VisualMediaGroupMemberTelegramMedia + +public inline fun TelegramMedia.ifVisualMediaGroupMemberTelegramMedia(block: (VisualMediaGroupMemberTelegramMedia) -> T): T? = visualMediaGroupMemberTelegramMediaOrNull() ?.let(block) + +public inline fun TelegramMedia.telegramMediaAnimationOrNull(): TelegramMediaAnimation? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaAnimation + +public inline fun TelegramMedia.telegramMediaAnimationOrThrow(): TelegramMediaAnimation = this as dev.inmo.tgbotapi.types.media.TelegramMediaAnimation + +public inline fun TelegramMedia.ifTelegramMediaAnimation(block: (TelegramMediaAnimation) -> T): T? = telegramMediaAnimationOrNull() ?.let(block) + +public inline fun TelegramMedia.telegramMediaVideoOrNull(): TelegramMediaVideo? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaVideo + +public inline fun TelegramMedia.telegramMediaVideoOrThrow(): TelegramMediaVideo = this as dev.inmo.tgbotapi.types.media.TelegramMediaVideo + +public inline fun TelegramMedia.ifTelegramMediaVideo(block: (TelegramMediaVideo) -> T): T? = telegramMediaVideoOrNull() ?.let(block) + +public inline fun TelegramMedia.withCustomizableCaptionTelegramMediaOrNull(): WithCustomizableCaptionTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.WithCustomizableCaptionTelegramMedia + +public inline fun TelegramMedia.withCustomizableCaptionTelegramMediaOrThrow(): WithCustomizableCaptionTelegramMedia = this as dev.inmo.tgbotapi.types.media.WithCustomizableCaptionTelegramMedia + +public inline fun TelegramMedia.ifWithCustomizableCaptionTelegramMedia(block: (WithCustomizableCaptionTelegramMedia) -> T): T? = withCustomizableCaptionTelegramMediaOrNull() ?.let(block) + +public inline fun TelegramMedia.coveredTelegramMediaOrNull(): CoveredTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.CoveredTelegramMedia + +public inline fun TelegramMedia.coveredTelegramMediaOrThrow(): CoveredTelegramMedia = this as dev.inmo.tgbotapi.types.media.CoveredTelegramMedia + +public inline fun TelegramMedia.ifCoveredTelegramMedia(block: (CoveredTelegramMedia) -> T): T? = coveredTelegramMediaOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.venueOrNull(): Venue? = this as? dev.inmo.tgbotapi.types.venue.Venue + +public inline fun BaseTelegramMediaFile.venueOrThrow(): Venue = this as dev.inmo.tgbotapi.types.venue.Venue + +public inline fun BaseTelegramMediaFile.ifVenue(block: (Venue) -> T): T? = venueOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.pollMediaOrNull(): PollMedia? = this as? dev.inmo.tgbotapi.types.media.PollMedia + +public inline fun BaseTelegramMediaFile.pollMediaOrThrow(): PollMedia = this as dev.inmo.tgbotapi.types.media.PollMedia + +public inline fun BaseTelegramMediaFile.ifPollMedia(block: (PollMedia) -> T): T? = pollMediaOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.livePhotoFileOrNull(): LivePhotoFile? = this as? dev.inmo.tgbotapi.types.files.LivePhotoFile + +public inline fun BaseTelegramMediaFile.livePhotoFileOrThrow(): LivePhotoFile = this as dev.inmo.tgbotapi.types.files.LivePhotoFile + +public inline fun BaseTelegramMediaFile.ifLivePhotoFile(block: (LivePhotoFile) -> T): T? = livePhotoFileOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.usefulAsPaidMediaFileOrNull(): UsefulAsPaidMediaFile? = this as? dev.inmo.tgbotapi.types.files.UsefulAsPaidMediaFile + +public inline fun BaseTelegramMediaFile.usefulAsPaidMediaFileOrThrow(): UsefulAsPaidMediaFile = this as dev.inmo.tgbotapi.types.files.UsefulAsPaidMediaFile + +public inline fun BaseTelegramMediaFile.ifUsefulAsPaidMediaFile(block: (UsefulAsPaidMediaFile) -> T): T? = usefulAsPaidMediaFileOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.passportFileOrNull(): PassportFile? = this as? dev.inmo.tgbotapi.types.files.PassportFile + +public inline fun BaseTelegramMediaFile.passportFileOrThrow(): PassportFile = this as dev.inmo.tgbotapi.types.files.PassportFile + +public inline fun BaseTelegramMediaFile.ifPassportFile(block: (PassportFile) -> T): T? = passportFileOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.videoQualityOrNull(): VideoQuality? = this as? dev.inmo.tgbotapi.types.files.VideoQuality + +public inline fun BaseTelegramMediaFile.videoQualityOrThrow(): VideoQuality = this as dev.inmo.tgbotapi.types.files.VideoQuality + +public inline fun BaseTelegramMediaFile.ifVideoQuality(block: (VideoQuality) -> T): T? = videoQualityOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.pathedFileOrNull(): PathedFile? = this as? dev.inmo.tgbotapi.types.files.PathedFile + +public inline fun BaseTelegramMediaFile.pathedFileOrThrow(): PathedFile = this as dev.inmo.tgbotapi.types.files.PathedFile + +public inline fun BaseTelegramMediaFile.ifPathedFile(block: (PathedFile) -> T): T? = pathedFileOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.mediaContentVariantOrNull(): MediaContentVariant? = this as? dev.inmo.tgbotapi.types.files.MediaContentVariant + +public inline fun BaseTelegramMediaFile.mediaContentVariantOrThrow(): MediaContentVariant = this as dev.inmo.tgbotapi.types.files.MediaContentVariant + +public inline fun BaseTelegramMediaFile.ifMediaContentVariant(block: (MediaContentVariant) -> T): T? = mediaContentVariantOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.photoFileOrNull(): PhotoFile? = this as? dev.inmo.tgbotapi.types.files.PhotoFile + +public inline fun BaseTelegramMediaFile.photoFileOrThrow(): PhotoFile = this as dev.inmo.tgbotapi.types.files.PhotoFile + +public inline fun BaseTelegramMediaFile.ifPhotoFile(block: (PhotoFile) -> T): T? = photoFileOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.photoSizeOrNull(): PhotoSize? = this as? dev.inmo.tgbotapi.types.files.PhotoSize + +public inline fun BaseTelegramMediaFile.photoSizeOrThrow(): PhotoSize = this as dev.inmo.tgbotapi.types.files.PhotoSize + +public inline fun BaseTelegramMediaFile.ifPhotoSize(block: (PhotoSize) -> T): T? = photoSizeOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.documentFileOrNull(): DocumentFile? = this as? dev.inmo.tgbotapi.types.files.DocumentFile + +public inline fun BaseTelegramMediaFile.documentFileOrThrow(): DocumentFile = this as dev.inmo.tgbotapi.types.files.DocumentFile + +public inline fun BaseTelegramMediaFile.ifDocumentFile(block: (DocumentFile) -> T): T? = documentFileOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.audioFileOrNull(): AudioFile? = this as? dev.inmo.tgbotapi.types.files.AudioFile + +public inline fun BaseTelegramMediaFile.audioFileOrThrow(): AudioFile = this as dev.inmo.tgbotapi.types.files.AudioFile + +public inline fun BaseTelegramMediaFile.ifAudioFile(block: (AudioFile) -> T): T? = audioFileOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.voiceFileOrNull(): VoiceFile? = this as? dev.inmo.tgbotapi.types.files.VoiceFile + +public inline fun BaseTelegramMediaFile.voiceFileOrThrow(): VoiceFile = this as dev.inmo.tgbotapi.types.files.VoiceFile + +public inline fun BaseTelegramMediaFile.ifVoiceFile(block: (VoiceFile) -> T): T? = voiceFileOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.stickerOrNull(): Sticker? = this as? dev.inmo.tgbotapi.types.files.Sticker + +public inline fun BaseTelegramMediaFile.stickerOrThrow(): Sticker = this as dev.inmo.tgbotapi.types.files.Sticker + +public inline fun BaseTelegramMediaFile.ifSticker(block: (Sticker) -> T): T? = stickerOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.videoStickerOrNull(): VideoSticker? = this as? dev.inmo.tgbotapi.types.files.VideoSticker + +public inline fun BaseTelegramMediaFile.videoStickerOrThrow(): VideoSticker = this as dev.inmo.tgbotapi.types.files.VideoSticker + +public inline fun BaseTelegramMediaFile.ifVideoSticker(block: (VideoSticker) -> T): T? = videoStickerOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.animatedStickerOrNull(): AnimatedSticker? = this as? dev.inmo.tgbotapi.types.files.AnimatedSticker + +public inline fun BaseTelegramMediaFile.animatedStickerOrThrow(): AnimatedSticker = this as dev.inmo.tgbotapi.types.files.AnimatedSticker + +public inline fun BaseTelegramMediaFile.ifAnimatedSticker(block: (AnimatedSticker) -> T): T? = animatedStickerOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.regularStickerOrNull(): RegularSticker? = this as? dev.inmo.tgbotapi.types.files.RegularSticker + +public inline fun BaseTelegramMediaFile.regularStickerOrThrow(): RegularSticker = this as dev.inmo.tgbotapi.types.files.RegularSticker + +public inline fun BaseTelegramMediaFile.ifRegularSticker(block: (RegularSticker) -> T): T? = regularStickerOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.regularSimpleStickerOrNull(): RegularSimpleSticker? = this as? dev.inmo.tgbotapi.types.files.RegularSimpleSticker + +public inline fun BaseTelegramMediaFile.regularSimpleStickerOrThrow(): RegularSimpleSticker = this as dev.inmo.tgbotapi.types.files.RegularSimpleSticker + +public inline fun BaseTelegramMediaFile.ifRegularSimpleSticker(block: (RegularSimpleSticker) -> T): T? = regularSimpleStickerOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.regularAnimatedStickerOrNull(): RegularAnimatedSticker? = this as? dev.inmo.tgbotapi.types.files.RegularAnimatedSticker + +public inline fun BaseTelegramMediaFile.regularAnimatedStickerOrThrow(): RegularAnimatedSticker = this as dev.inmo.tgbotapi.types.files.RegularAnimatedSticker + +public inline fun BaseTelegramMediaFile.ifRegularAnimatedSticker(block: (RegularAnimatedSticker) -> T): T? = regularAnimatedStickerOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.regularVideoStickerOrNull(): RegularVideoSticker? = this as? dev.inmo.tgbotapi.types.files.RegularVideoSticker + +public inline fun BaseTelegramMediaFile.regularVideoStickerOrThrow(): RegularVideoSticker = this as dev.inmo.tgbotapi.types.files.RegularVideoSticker + +public inline fun BaseTelegramMediaFile.ifRegularVideoSticker(block: (RegularVideoSticker) -> T): T? = regularVideoStickerOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.maskStickerOrNull(): MaskSticker? = this as? dev.inmo.tgbotapi.types.files.MaskSticker + +public inline fun BaseTelegramMediaFile.maskStickerOrThrow(): MaskSticker = this as dev.inmo.tgbotapi.types.files.MaskSticker + +public inline fun BaseTelegramMediaFile.ifMaskSticker(block: (MaskSticker) -> T): T? = maskStickerOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.maskSimpleStickerOrNull(): MaskSimpleSticker? = this as? dev.inmo.tgbotapi.types.files.MaskSimpleSticker + +public inline fun BaseTelegramMediaFile.maskSimpleStickerOrThrow(): MaskSimpleSticker = this as dev.inmo.tgbotapi.types.files.MaskSimpleSticker + +public inline fun BaseTelegramMediaFile.ifMaskSimpleSticker(block: (MaskSimpleSticker) -> T): T? = maskSimpleStickerOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.maskAnimatedStickerOrNull(): MaskAnimatedSticker? = this as? dev.inmo.tgbotapi.types.files.MaskAnimatedSticker + +public inline fun BaseTelegramMediaFile.maskAnimatedStickerOrThrow(): MaskAnimatedSticker = this as dev.inmo.tgbotapi.types.files.MaskAnimatedSticker + +public inline fun BaseTelegramMediaFile.ifMaskAnimatedSticker(block: (MaskAnimatedSticker) -> T): T? = maskAnimatedStickerOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.maskVideoStickerOrNull(): MaskVideoSticker? = this as? dev.inmo.tgbotapi.types.files.MaskVideoSticker + +public inline fun BaseTelegramMediaFile.maskVideoStickerOrThrow(): MaskVideoSticker = this as dev.inmo.tgbotapi.types.files.MaskVideoSticker + +public inline fun BaseTelegramMediaFile.ifMaskVideoSticker(block: (MaskVideoSticker) -> T): T? = maskVideoStickerOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.customEmojiStickerOrNull(): CustomEmojiSticker? = this as? dev.inmo.tgbotapi.types.files.CustomEmojiSticker + +public inline fun BaseTelegramMediaFile.customEmojiStickerOrThrow(): CustomEmojiSticker = this as dev.inmo.tgbotapi.types.files.CustomEmojiSticker + +public inline fun BaseTelegramMediaFile.ifCustomEmojiSticker(block: (CustomEmojiSticker) -> T): T? = customEmojiStickerOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.customEmojiSimpleStickerOrNull(): CustomEmojiSimpleSticker? = this as? dev.inmo.tgbotapi.types.files.CustomEmojiSimpleSticker + +public inline fun BaseTelegramMediaFile.customEmojiSimpleStickerOrThrow(): CustomEmojiSimpleSticker = this as dev.inmo.tgbotapi.types.files.CustomEmojiSimpleSticker + +public inline fun BaseTelegramMediaFile.ifCustomEmojiSimpleSticker(block: (CustomEmojiSimpleSticker) -> T): T? = customEmojiSimpleStickerOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.customEmojiAnimatedStickerOrNull(): CustomEmojiAnimatedSticker? = this as? dev.inmo.tgbotapi.types.files.CustomEmojiAnimatedSticker + +public inline fun BaseTelegramMediaFile.customEmojiAnimatedStickerOrThrow(): CustomEmojiAnimatedSticker = this as dev.inmo.tgbotapi.types.files.CustomEmojiAnimatedSticker + +public inline fun BaseTelegramMediaFile.ifCustomEmojiAnimatedSticker(block: (CustomEmojiAnimatedSticker) -> T): T? = customEmojiAnimatedStickerOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.customEmojiVideoStickerOrNull(): CustomEmojiVideoSticker? = this as? dev.inmo.tgbotapi.types.files.CustomEmojiVideoSticker + +public inline fun BaseTelegramMediaFile.customEmojiVideoStickerOrThrow(): CustomEmojiVideoSticker = this as dev.inmo.tgbotapi.types.files.CustomEmojiVideoSticker + +public inline fun BaseTelegramMediaFile.ifCustomEmojiVideoSticker(block: (CustomEmojiVideoSticker) -> T): T? = customEmojiVideoStickerOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.unknownStickerOrNull(): UnknownSticker? = this as? dev.inmo.tgbotapi.types.files.UnknownSticker + +public inline fun BaseTelegramMediaFile.unknownStickerOrThrow(): UnknownSticker = this as dev.inmo.tgbotapi.types.files.UnknownSticker + +public inline fun BaseTelegramMediaFile.ifUnknownSticker(block: (UnknownSticker) -> T): T? = unknownStickerOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.mimedMediaFileOrNull(): MimedMediaFile? = this as? dev.inmo.tgbotapi.types.files.MimedMediaFile + +public inline fun BaseTelegramMediaFile.mimedMediaFileOrThrow(): MimedMediaFile = this as dev.inmo.tgbotapi.types.files.MimedMediaFile + +public inline fun BaseTelegramMediaFile.ifMimedMediaFile(block: (MimedMediaFile) -> T): T? = mimedMediaFileOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.sizedMediaFileOrNull(): SizedMediaFile? = this as? dev.inmo.tgbotapi.types.files.SizedMediaFile + +public inline fun BaseTelegramMediaFile.sizedMediaFileOrThrow(): SizedMediaFile = this as dev.inmo.tgbotapi.types.files.SizedMediaFile + +public inline fun BaseTelegramMediaFile.ifSizedMediaFile(block: (SizedMediaFile) -> T): T? = sizedMediaFileOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.coveredMediaFileOrNull(): CoveredMediaFile? = this as? dev.inmo.tgbotapi.types.files.CoveredMediaFile + +public inline fun BaseTelegramMediaFile.coveredMediaFileOrThrow(): CoveredMediaFile = this as dev.inmo.tgbotapi.types.files.CoveredMediaFile + +public inline fun BaseTelegramMediaFile.ifCoveredMediaFile(block: (CoveredMediaFile) -> T): T? = coveredMediaFileOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.videoNoteFileOrNull(): VideoNoteFile? = this as? dev.inmo.tgbotapi.types.files.VideoNoteFile + +public inline fun BaseTelegramMediaFile.videoNoteFileOrThrow(): VideoNoteFile = this as dev.inmo.tgbotapi.types.files.VideoNoteFile + +public inline fun BaseTelegramMediaFile.ifVideoNoteFile(block: (VideoNoteFile) -> T): T? = videoNoteFileOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.thumbedMediaFileOrNull(): ThumbedMediaFile? = this as? dev.inmo.tgbotapi.types.files.ThumbedMediaFile + +public inline fun BaseTelegramMediaFile.thumbedMediaFileOrThrow(): ThumbedMediaFile = this as dev.inmo.tgbotapi.types.files.ThumbedMediaFile + +public inline fun BaseTelegramMediaFile.ifThumbedMediaFile(block: (ThumbedMediaFile) -> T): T? = thumbedMediaFileOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.animationFileOrNull(): AnimationFile? = this as? dev.inmo.tgbotapi.types.files.AnimationFile + +public inline fun BaseTelegramMediaFile.animationFileOrThrow(): AnimationFile = this as dev.inmo.tgbotapi.types.files.AnimationFile + +public inline fun BaseTelegramMediaFile.ifAnimationFile(block: (AnimationFile) -> T): T? = animationFileOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.telegramMediaFileOrNull(): TelegramMediaFile? = this as? dev.inmo.tgbotapi.types.files.TelegramMediaFile + +public inline fun BaseTelegramMediaFile.telegramMediaFileOrThrow(): TelegramMediaFile = this as dev.inmo.tgbotapi.types.files.TelegramMediaFile + +public inline fun BaseTelegramMediaFile.ifTelegramMediaFile(block: (TelegramMediaFile) -> T): T? = telegramMediaFileOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.videoFileOrNull(): VideoFile? = this as? dev.inmo.tgbotapi.types.files.VideoFile + +public inline fun BaseTelegramMediaFile.videoFileOrThrow(): VideoFile = this as dev.inmo.tgbotapi.types.files.VideoFile + +public inline fun BaseTelegramMediaFile.ifVideoFile(block: (VideoFile) -> T): T? = videoFileOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.playableMediaFileOrNull(): PlayableMediaFile? = this as? dev.inmo.tgbotapi.types.files.PlayableMediaFile + +public inline fun BaseTelegramMediaFile.playableMediaFileOrThrow(): PlayableMediaFile = this as dev.inmo.tgbotapi.types.files.PlayableMediaFile + +public inline fun BaseTelegramMediaFile.ifPlayableMediaFile(block: (PlayableMediaFile) -> T): T? = playableMediaFileOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.fileOrNull(): File? = this as? dev.inmo.tgbotapi.types.files.File + +public inline fun BaseTelegramMediaFile.fileOrThrow(): File = this as dev.inmo.tgbotapi.types.files.File + +public inline fun BaseTelegramMediaFile.ifFile(block: (File) -> T): T? = fileOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.staticLocationOrNull(): StaticLocation? = this as? dev.inmo.tgbotapi.types.location.StaticLocation + +public inline fun BaseTelegramMediaFile.staticLocationOrThrow(): StaticLocation = this as dev.inmo.tgbotapi.types.location.StaticLocation + +public inline fun BaseTelegramMediaFile.ifStaticLocation(block: (StaticLocation) -> T): T? = staticLocationOrNull() ?.let(block) + +public inline fun BaseTelegramMediaFile.linkOrNull(): Link? = this as? dev.inmo.tgbotapi.types.Link + +public inline fun BaseTelegramMediaFile.linkOrThrow(): Link = this as dev.inmo.tgbotapi.types.Link + +public inline fun BaseTelegramMediaFile.ifLink(block: (Link) -> T): T? = linkOrNull() ?.let(block) + +public inline fun InputPollOptionMedia.telegramMediaLinkOrNull(): TelegramMediaLink? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaLink + +public inline fun InputPollOptionMedia.telegramMediaLinkOrThrow(): TelegramMediaLink = this as dev.inmo.tgbotapi.types.media.TelegramMediaLink + +public inline fun InputPollOptionMedia.ifTelegramMediaLink(block: (TelegramMediaLink) -> T): T? = telegramMediaLinkOrNull() ?.let(block) + +public inline fun InputPollOptionMedia.telegramMediaPhotoOrNull(): TelegramMediaPhoto? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaPhoto + +public inline fun InputPollOptionMedia.telegramMediaPhotoOrThrow(): TelegramMediaPhoto = this as dev.inmo.tgbotapi.types.media.TelegramMediaPhoto + +public inline fun InputPollOptionMedia.ifTelegramMediaPhoto(block: (TelegramMediaPhoto) -> T): T? = telegramMediaPhotoOrNull() ?.let(block) + +public inline fun InputPollOptionMedia.telegramMediaStickerOrNull(): TelegramMediaSticker? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaSticker + +public inline fun InputPollOptionMedia.telegramMediaStickerOrThrow(): TelegramMediaSticker = this as dev.inmo.tgbotapi.types.media.TelegramMediaSticker + +public inline fun InputPollOptionMedia.ifTelegramMediaSticker(block: (TelegramMediaSticker) -> T): T? = telegramMediaStickerOrNull() ?.let(block) + +public inline fun InputPollOptionMedia.telegramMediaVenueOrNull(): TelegramMediaVenue? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaVenue + +public inline fun InputPollOptionMedia.telegramMediaVenueOrThrow(): TelegramMediaVenue = this as dev.inmo.tgbotapi.types.media.TelegramMediaVenue + +public inline fun InputPollOptionMedia.ifTelegramMediaVenue(block: (TelegramMediaVenue) -> T): T? = telegramMediaVenueOrNull() ?.let(block) + +public inline fun InputPollOptionMedia.telegramMediaLocationOrNull(): TelegramMediaLocation? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaLocation + +public inline fun InputPollOptionMedia.telegramMediaLocationOrThrow(): TelegramMediaLocation = this as dev.inmo.tgbotapi.types.media.TelegramMediaLocation + +public inline fun InputPollOptionMedia.ifTelegramMediaLocation(block: (TelegramMediaLocation) -> T): T? = telegramMediaLocationOrNull() ?.let(block) + +public inline fun InputPollOptionMedia.telegramMediaLivePhotoOrNull(): TelegramMediaLivePhoto? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaLivePhoto + +public inline fun InputPollOptionMedia.telegramMediaLivePhotoOrThrow(): TelegramMediaLivePhoto = this as dev.inmo.tgbotapi.types.media.TelegramMediaLivePhoto + +public inline fun InputPollOptionMedia.ifTelegramMediaLivePhoto(block: (TelegramMediaLivePhoto) -> T): T? = telegramMediaLivePhotoOrNull() ?.let(block) + +public inline fun InputPollOptionMedia.telegramMediaAnimationOrNull(): TelegramMediaAnimation? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaAnimation + +public inline fun InputPollOptionMedia.telegramMediaAnimationOrThrow(): TelegramMediaAnimation = this as dev.inmo.tgbotapi.types.media.TelegramMediaAnimation + +public inline fun InputPollOptionMedia.ifTelegramMediaAnimation(block: (TelegramMediaAnimation) -> T): T? = telegramMediaAnimationOrNull() ?.let(block) + +public inline fun InputPollOptionMedia.telegramMediaVideoOrNull(): TelegramMediaVideo? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaVideo + +public inline fun InputPollOptionMedia.telegramMediaVideoOrThrow(): TelegramMediaVideo = this as dev.inmo.tgbotapi.types.media.TelegramMediaVideo + +public inline fun InputPollOptionMedia.ifTelegramMediaVideo(block: (TelegramMediaVideo) -> T): T? = telegramMediaVideoOrNull() ?.let(block) + +public inline fun RequestResponse.chatSharedRequestOrNull(): ChatSharedRequest? = this as? dev.inmo.tgbotapi.types.request.ChatSharedRequest + +public inline fun RequestResponse.chatSharedRequestOrThrow(): ChatSharedRequest = this as dev.inmo.tgbotapi.types.request.ChatSharedRequest + +public inline fun RequestResponse.ifChatSharedRequest(block: (ChatSharedRequest) -> T): T? = chatSharedRequestOrNull() ?.let(block) + +public inline fun RequestResponse.chatSharedOrNull(): ChatShared? = this as? dev.inmo.tgbotapi.types.request.ChatShared + +public inline fun RequestResponse.chatSharedOrThrow(): ChatShared = this as dev.inmo.tgbotapi.types.request.ChatShared + +public inline fun RequestResponse.ifChatShared(block: (ChatShared) -> T): T? = chatSharedOrNull() ?.let(block) + +public inline fun RequestResponse.usersSharedOrNull(): UsersShared? = this as? dev.inmo.tgbotapi.types.request.UsersShared + +public inline fun RequestResponse.usersSharedOrThrow(): UsersShared = this as dev.inmo.tgbotapi.types.request.UsersShared + +public inline fun RequestResponse.ifUsersShared(block: (UsersShared) -> T): T? = usersSharedOrNull() ?.let(block) + +public inline fun ScheduledCloseInfo.exactScheduledCloseInfoOrNull(): ExactScheduledCloseInfo? = this as? dev.inmo.tgbotapi.types.polls.ExactScheduledCloseInfo + +public inline fun ScheduledCloseInfo.exactScheduledCloseInfoOrThrow(): ExactScheduledCloseInfo = this as dev.inmo.tgbotapi.types.polls.ExactScheduledCloseInfo + +public inline fun ScheduledCloseInfo.ifExactScheduledCloseInfo(block: (ExactScheduledCloseInfo) -> T): T? = exactScheduledCloseInfoOrNull() ?.let(block) + +public inline fun ScheduledCloseInfo.approximateScheduledCloseInfoOrNull(): ApproximateScheduledCloseInfo? = this as? dev.inmo.tgbotapi.types.polls.ApproximateScheduledCloseInfo + +public inline fun ScheduledCloseInfo.approximateScheduledCloseInfoOrThrow(): ApproximateScheduledCloseInfo = this as dev.inmo.tgbotapi.types.polls.ApproximateScheduledCloseInfo + +public inline fun ScheduledCloseInfo.ifApproximateScheduledCloseInfo(block: (ApproximateScheduledCloseInfo) -> T): T? = approximateScheduledCloseInfoOrNull() ?.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 + +public inline fun Poll.ifUnknownPollType(block: (UnknownPollType) -> T): T? = unknownPollTypeOrNull() ?.let(block) + +public inline fun Poll.regularPollOrNull(): RegularPoll? = this as? dev.inmo.tgbotapi.types.polls.RegularPoll + +public inline fun Poll.regularPollOrThrow(): RegularPoll = this as dev.inmo.tgbotapi.types.polls.RegularPoll + +public inline fun Poll.ifRegularPoll(block: (RegularPoll) -> T): T? = regularPollOrNull() ?.let(block) + +public inline fun Poll.quizPollOrNull(): QuizPoll? = this as? dev.inmo.tgbotapi.types.polls.QuizPoll + +public inline fun Poll.quizPollOrThrow(): QuizPoll = this as dev.inmo.tgbotapi.types.polls.QuizPoll + +public inline fun Poll.ifQuizPoll(block: (QuizPoll) -> T): T? = quizPollOrNull() ?.let(block) public inline fun BackgroundType.movableOrNull(): BackgroundType.Movable? = this as? dev.inmo.tgbotapi.types.BackgroundType.Movable @@ -676,396 +1296,6 @@ public inline fun BackgroundType.unknownOrThrow(): BackgroundType.Unknown = this public inline fun BackgroundType.ifUnknown(block: (BackgroundType.Unknown) -> T): T? = unknownOrNull() ?.let(block) -public inline fun InlineKeyboardButton.unknownInlineKeyboardButtonOrNull(): UnknownInlineKeyboardButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.UnknownInlineKeyboardButton - -public inline fun InlineKeyboardButton.unknownInlineKeyboardButtonOrThrow(): UnknownInlineKeyboardButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.UnknownInlineKeyboardButton - -public inline fun InlineKeyboardButton.ifUnknownInlineKeyboardButton(block: (UnknownInlineKeyboardButton) -> T): T? = unknownInlineKeyboardButtonOrNull() ?.let(block) - -public inline fun InlineKeyboardButton.payInlineKeyboardButtonOrNull(): PayInlineKeyboardButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.PayInlineKeyboardButton - -public inline fun InlineKeyboardButton.payInlineKeyboardButtonOrThrow(): PayInlineKeyboardButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.PayInlineKeyboardButton - -public inline fun InlineKeyboardButton.ifPayInlineKeyboardButton(block: (PayInlineKeyboardButton) -> T): T? = payInlineKeyboardButtonOrNull() ?.let(block) - -public inline fun InlineKeyboardButton.callbackDataInlineKeyboardButtonOrNull(): CallbackDataInlineKeyboardButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CallbackDataInlineKeyboardButton - -public inline fun InlineKeyboardButton.callbackDataInlineKeyboardButtonOrThrow(): CallbackDataInlineKeyboardButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CallbackDataInlineKeyboardButton - -public inline fun InlineKeyboardButton.ifCallbackDataInlineKeyboardButton(block: (CallbackDataInlineKeyboardButton) -> T): T? = callbackDataInlineKeyboardButtonOrNull() ?.let(block) - -public inline fun InlineKeyboardButton.callbackGameInlineKeyboardButtonOrNull(): CallbackGameInlineKeyboardButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CallbackGameInlineKeyboardButton - -public inline fun InlineKeyboardButton.callbackGameInlineKeyboardButtonOrThrow(): CallbackGameInlineKeyboardButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CallbackGameInlineKeyboardButton - -public inline fun InlineKeyboardButton.ifCallbackGameInlineKeyboardButton(block: (CallbackGameInlineKeyboardButton) -> T): T? = callbackGameInlineKeyboardButtonOrNull() ?.let(block) - -public inline fun InlineKeyboardButton.loginURLInlineKeyboardButtonOrNull(): LoginURLInlineKeyboardButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.LoginURLInlineKeyboardButton - -public inline fun InlineKeyboardButton.loginURLInlineKeyboardButtonOrThrow(): LoginURLInlineKeyboardButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.LoginURLInlineKeyboardButton - -public inline fun InlineKeyboardButton.ifLoginURLInlineKeyboardButton(block: (LoginURLInlineKeyboardButton) -> T): T? = loginURLInlineKeyboardButtonOrNull() ?.let(block) - -public inline fun InlineKeyboardButton.switchInlineQueryCurrentChatInlineKeyboardButtonOrNull(): SwitchInlineQueryCurrentChatInlineKeyboardButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.SwitchInlineQueryCurrentChatInlineKeyboardButton - -public inline fun InlineKeyboardButton.switchInlineQueryCurrentChatInlineKeyboardButtonOrThrow(): SwitchInlineQueryCurrentChatInlineKeyboardButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.SwitchInlineQueryCurrentChatInlineKeyboardButton - -public inline fun InlineKeyboardButton.ifSwitchInlineQueryCurrentChatInlineKeyboardButton(block: (SwitchInlineQueryCurrentChatInlineKeyboardButton) -> T): T? = switchInlineQueryCurrentChatInlineKeyboardButtonOrNull() ?.let(block) - -public inline fun InlineKeyboardButton.switchInlineQueryChosenChatInlineKeyboardButtonOrNull(): SwitchInlineQueryChosenChatInlineKeyboardButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.SwitchInlineQueryChosenChatInlineKeyboardButton - -public inline fun InlineKeyboardButton.switchInlineQueryChosenChatInlineKeyboardButtonOrThrow(): SwitchInlineQueryChosenChatInlineKeyboardButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.SwitchInlineQueryChosenChatInlineKeyboardButton - -public inline fun InlineKeyboardButton.ifSwitchInlineQueryChosenChatInlineKeyboardButton(block: (SwitchInlineQueryChosenChatInlineKeyboardButton) -> T): T? = switchInlineQueryChosenChatInlineKeyboardButtonOrNull() ?.let(block) - -public inline fun InlineKeyboardButton.switchInlineQueryInlineKeyboardButtonOrNull(): SwitchInlineQueryInlineKeyboardButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.SwitchInlineQueryInlineKeyboardButton - -public inline fun InlineKeyboardButton.switchInlineQueryInlineKeyboardButtonOrThrow(): SwitchInlineQueryInlineKeyboardButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.SwitchInlineQueryInlineKeyboardButton - -public inline fun InlineKeyboardButton.ifSwitchInlineQueryInlineKeyboardButton(block: (SwitchInlineQueryInlineKeyboardButton) -> T): T? = switchInlineQueryInlineKeyboardButtonOrNull() ?.let(block) - -public inline fun InlineKeyboardButton.uRLInlineKeyboardButtonOrNull(): URLInlineKeyboardButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.URLInlineKeyboardButton - -public inline fun InlineKeyboardButton.uRLInlineKeyboardButtonOrThrow(): URLInlineKeyboardButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.URLInlineKeyboardButton - -public inline fun InlineKeyboardButton.ifURLInlineKeyboardButton(block: (URLInlineKeyboardButton) -> T): T? = uRLInlineKeyboardButtonOrNull() ?.let(block) - -public inline fun InlineKeyboardButton.copyTextButtonOrNull(): CopyTextButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CopyTextButton - -public inline fun InlineKeyboardButton.copyTextButtonOrThrow(): CopyTextButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CopyTextButton - -public inline fun InlineKeyboardButton.ifCopyTextButton(block: (CopyTextButton) -> T): T? = copyTextButtonOrNull() ?.let(block) - -public inline fun InlineKeyboardButton.webAppInlineKeyboardButtonOrNull(): WebAppInlineKeyboardButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.WebAppInlineKeyboardButton - -public inline fun InlineKeyboardButton.webAppInlineKeyboardButtonOrThrow(): WebAppInlineKeyboardButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.WebAppInlineKeyboardButton - -public inline fun InlineKeyboardButton.ifWebAppInlineKeyboardButton(block: (WebAppInlineKeyboardButton) -> T): T? = webAppInlineKeyboardButtonOrNull() ?.let(block) - -public inline fun KeyboardButtonRequestUsers.anyOrNull(): KeyboardButtonRequestUsers.Any? = this as? dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Any - -public inline fun KeyboardButtonRequestUsers.anyOrThrow(): KeyboardButtonRequestUsers.Any = this as dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Any - -public inline fun KeyboardButtonRequestUsers.ifAny(block: (KeyboardButtonRequestUsers.Any) -> T): T? = anyOrNull() ?.let(block) - -public inline fun KeyboardButtonRequestUsers.commonOrNull(): KeyboardButtonRequestUsers.Common? = this as? dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Common - -public inline fun KeyboardButtonRequestUsers.commonOrThrow(): KeyboardButtonRequestUsers.Common = this as dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Common - -public inline fun KeyboardButtonRequestUsers.ifCommon(block: (KeyboardButtonRequestUsers.Common) -> T): T? = commonOrNull() ?.let(block) - -public inline fun KeyboardButtonRequestUsers.botOrNull(): KeyboardButtonRequestUsers.Bot? = this as? dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Bot - -public inline fun KeyboardButtonRequestUsers.botOrThrow(): KeyboardButtonRequestUsers.Bot = this as dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Bot - -public inline fun KeyboardButtonRequestUsers.ifBot(block: (KeyboardButtonRequestUsers.Bot) -> T): T? = botOrNull() ?.let(block) - -public inline fun KeyboardMarkup.replyKeyboardRemoveOrNull(): ReplyKeyboardRemove? = this as? dev.inmo.tgbotapi.types.buttons.ReplyKeyboardRemove - -public inline fun KeyboardMarkup.replyKeyboardRemoveOrThrow(): ReplyKeyboardRemove = this as dev.inmo.tgbotapi.types.buttons.ReplyKeyboardRemove - -public inline fun KeyboardMarkup.ifReplyKeyboardRemove(block: (ReplyKeyboardRemove) -> T): T? = replyKeyboardRemoveOrNull() ?.let(block) - -public inline fun KeyboardMarkup.replyKeyboardMarkupOrNull(): ReplyKeyboardMarkup? = this as? dev.inmo.tgbotapi.types.buttons.ReplyKeyboardMarkup - -public inline fun KeyboardMarkup.replyKeyboardMarkupOrThrow(): ReplyKeyboardMarkup = this as dev.inmo.tgbotapi.types.buttons.ReplyKeyboardMarkup - -public inline fun KeyboardMarkup.ifReplyKeyboardMarkup(block: (ReplyKeyboardMarkup) -> T): T? = replyKeyboardMarkupOrNull() ?.let(block) - -public inline fun KeyboardMarkup.replyForceOrNull(): ReplyForce? = this as? dev.inmo.tgbotapi.types.buttons.ReplyForce - -public inline fun KeyboardMarkup.replyForceOrThrow(): ReplyForce = this as dev.inmo.tgbotapi.types.buttons.ReplyForce - -public inline fun KeyboardMarkup.ifReplyForce(block: (ReplyForce) -> T): T? = replyForceOrNull() ?.let(block) - -public inline fun KeyboardMarkup.inlineKeyboardMarkupOrNull(): InlineKeyboardMarkup? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup - -public inline fun KeyboardMarkup.inlineKeyboardMarkupOrThrow(): InlineKeyboardMarkup = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup - -public inline fun KeyboardMarkup.ifInlineKeyboardMarkup(block: (InlineKeyboardMarkup) -> T): T? = inlineKeyboardMarkupOrNull() ?.let(block) - -public inline fun Reaction.emojiOrNull(): Reaction.Emoji? = this as? dev.inmo.tgbotapi.types.reactions.Reaction.Emoji - -public inline fun Reaction.emojiOrThrow(): Reaction.Emoji = this as dev.inmo.tgbotapi.types.reactions.Reaction.Emoji - -public inline fun Reaction.ifEmoji(block: (Reaction.Emoji) -> T): T? = emojiOrNull() ?.let(block) - -public inline fun Reaction.customEmojiOrNull(): Reaction.CustomEmoji? = this as? dev.inmo.tgbotapi.types.reactions.Reaction.CustomEmoji - -public inline fun Reaction.customEmojiOrThrow(): Reaction.CustomEmoji = this as dev.inmo.tgbotapi.types.reactions.Reaction.CustomEmoji - -public inline fun Reaction.ifCustomEmoji(block: (Reaction.CustomEmoji) -> T): T? = customEmojiOrNull() ?.let(block) - -public inline fun Reaction.paidOrNull(): Reaction.Paid? = this as? dev.inmo.tgbotapi.types.reactions.Reaction.Paid - -public inline fun Reaction.paidOrThrow(): Reaction.Paid = this as dev.inmo.tgbotapi.types.reactions.Reaction.Paid - -public inline fun Reaction.ifPaid(block: (Reaction.Paid) -> T): T? = paidOrNull() ?.let(block) - -public inline fun Reaction.unknownOrNull(): Reaction.Unknown? = this as? dev.inmo.tgbotapi.types.reactions.Reaction.Unknown - -public inline fun Reaction.unknownOrThrow(): Reaction.Unknown = this as dev.inmo.tgbotapi.types.reactions.Reaction.Unknown - -public inline fun Reaction.ifUnknown(block: (Reaction.Unknown) -> T): T? = unknownOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultStickerCachedOrNull(): InlineQueryResultStickerCached? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultStickerCached - -public inline fun InlineQueryResult.inlineQueryResultStickerCachedOrThrow(): InlineQueryResultStickerCached = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultStickerCached - -public inline fun InlineQueryResult.ifInlineQueryResultStickerCached(block: (InlineQueryResultStickerCached) -> T): T? = inlineQueryResultStickerCachedOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultLocationOrNull(): InlineQueryResultLocation? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultLocation - -public inline fun InlineQueryResult.inlineQueryResultLocationOrThrow(): InlineQueryResultLocation = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultLocation - -public inline fun InlineQueryResult.ifInlineQueryResultLocation(block: (InlineQueryResultLocation) -> T): T? = inlineQueryResultLocationOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultContactOrNull(): InlineQueryResultContact? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultContact - -public inline fun InlineQueryResult.inlineQueryResultContactOrThrow(): InlineQueryResultContact = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultContact - -public inline fun InlineQueryResult.ifInlineQueryResultContact(block: (InlineQueryResultContact) -> T): T? = inlineQueryResultContactOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultGameOrNull(): InlineQueryResultGame? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultGame - -public inline fun InlineQueryResult.inlineQueryResultGameOrThrow(): InlineQueryResultGame = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultGame - -public inline fun InlineQueryResult.ifInlineQueryResultGame(block: (InlineQueryResultGame) -> T): T? = inlineQueryResultGameOrNull() ?.let(block) - -public inline fun InlineQueryResult.sizedInlineQueryResultOrNull(): SizedInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.SizedInlineQueryResult - -public inline fun InlineQueryResult.sizedInlineQueryResultOrThrow(): SizedInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.SizedInlineQueryResult - -public inline fun InlineQueryResult.ifSizedInlineQueryResult(block: (SizedInlineQueryResult) -> T): T? = sizedInlineQueryResultOrNull() ?.let(block) - -public inline fun InlineQueryResult.withInputMessageContentInlineQueryResultOrNull(): WithInputMessageContentInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.WithInputMessageContentInlineQueryResult - -public inline fun InlineQueryResult.withInputMessageContentInlineQueryResultOrThrow(): WithInputMessageContentInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.WithInputMessageContentInlineQueryResult - -public inline fun InlineQueryResult.ifWithInputMessageContentInlineQueryResult(block: (WithInputMessageContentInlineQueryResult) -> T): T? = withInputMessageContentInlineQueryResultOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultDocumentCommonOrNull(): InlineQueryResultDocumentCommon? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.document.InlineQueryResultDocumentCommon - -public inline fun InlineQueryResult.inlineQueryResultDocumentCommonOrThrow(): InlineQueryResultDocumentCommon = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.document.InlineQueryResultDocumentCommon - -public inline fun InlineQueryResult.ifInlineQueryResultDocumentCommon(block: (InlineQueryResultDocumentCommon) -> T): T? = inlineQueryResultDocumentCommonOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultDocumentOrNull(): InlineQueryResultDocument? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.document.InlineQueryResultDocument - -public inline fun InlineQueryResult.inlineQueryResultDocumentOrThrow(): InlineQueryResultDocument = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.document.InlineQueryResultDocument - -public inline fun InlineQueryResult.ifInlineQueryResultDocument(block: (InlineQueryResultDocument) -> T): T? = inlineQueryResultDocumentOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultDocumentCachedOrNull(): InlineQueryResultDocumentCached? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.document.InlineQueryResultDocumentCached - -public inline fun InlineQueryResult.inlineQueryResultDocumentCachedOrThrow(): InlineQueryResultDocumentCached = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.document.InlineQueryResultDocumentCached - -public inline fun InlineQueryResult.ifInlineQueryResultDocumentCached(block: (InlineQueryResultDocumentCached) -> T): T? = inlineQueryResultDocumentCachedOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultVoiceCachedOrNull(): InlineQueryResultVoiceCached? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.InlineQueryResultVoiceCached - -public inline fun InlineQueryResult.inlineQueryResultVoiceCachedOrThrow(): InlineQueryResultVoiceCached = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.InlineQueryResultVoiceCached - -public inline fun InlineQueryResult.ifInlineQueryResultVoiceCached(block: (InlineQueryResultVoiceCached) -> T): T? = inlineQueryResultVoiceCachedOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultVoiceCommonOrNull(): InlineQueryResultVoiceCommon? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.InlineQueryResultVoiceCommon - -public inline fun InlineQueryResult.inlineQueryResultVoiceCommonOrThrow(): InlineQueryResultVoiceCommon = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.InlineQueryResultVoiceCommon - -public inline fun InlineQueryResult.ifInlineQueryResultVoiceCommon(block: (InlineQueryResultVoiceCommon) -> T): T? = inlineQueryResultVoiceCommonOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultVoiceOrNull(): InlineQueryResultVoice? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.InlineQueryResultVoice - -public inline fun InlineQueryResult.inlineQueryResultVoiceOrThrow(): InlineQueryResultVoice = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.InlineQueryResultVoice - -public inline fun InlineQueryResult.ifInlineQueryResultVoice(block: (InlineQueryResultVoice) -> T): T? = inlineQueryResultVoiceOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultVideoCommonOrNull(): InlineQueryResultVideoCommon? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.InlineQueryResultVideoCommon - -public inline fun InlineQueryResult.inlineQueryResultVideoCommonOrThrow(): InlineQueryResultVideoCommon = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.InlineQueryResultVideoCommon - -public inline fun InlineQueryResult.ifInlineQueryResultVideoCommon(block: (InlineQueryResultVideoCommon) -> T): T? = inlineQueryResultVideoCommonOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultVideoOrNull(): InlineQueryResultVideo? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.InlineQueryResultVideo - -public inline fun InlineQueryResult.inlineQueryResultVideoOrThrow(): InlineQueryResultVideo = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.InlineQueryResultVideo - -public inline fun InlineQueryResult.ifInlineQueryResultVideo(block: (InlineQueryResultVideo) -> T): T? = inlineQueryResultVideoOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultVideoCachedOrNull(): InlineQueryResultVideoCached? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.InlineQueryResultVideoCached - -public inline fun InlineQueryResult.inlineQueryResultVideoCachedOrThrow(): InlineQueryResultVideoCached = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.InlineQueryResultVideoCached - -public inline fun InlineQueryResult.ifInlineQueryResultVideoCached(block: (InlineQueryResultVideoCached) -> T): T? = inlineQueryResultVideoCachedOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultGifCachedOrNull(): InlineQueryResultGifCached? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGifCached - -public inline fun InlineQueryResult.inlineQueryResultGifCachedOrThrow(): InlineQueryResultGifCached = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGifCached - -public inline fun InlineQueryResult.ifInlineQueryResultGifCached(block: (InlineQueryResultGifCached) -> T): T? = inlineQueryResultGifCachedOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultGifCommonOrNull(): InlineQueryResultGifCommon? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGifCommon - -public inline fun InlineQueryResult.inlineQueryResultGifCommonOrThrow(): InlineQueryResultGifCommon = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGifCommon - -public inline fun InlineQueryResult.ifInlineQueryResultGifCommon(block: (InlineQueryResultGifCommon) -> T): T? = inlineQueryResultGifCommonOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultGifOrNull(): InlineQueryResultGif? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGif - -public inline fun InlineQueryResult.inlineQueryResultGifOrThrow(): InlineQueryResultGif = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGif - -public inline fun InlineQueryResult.ifInlineQueryResultGif(block: (InlineQueryResultGif) -> T): T? = inlineQueryResultGifOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultAudioOrNull(): InlineQueryResultAudio? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.audio.InlineQueryResultAudio - -public inline fun InlineQueryResult.inlineQueryResultAudioOrThrow(): InlineQueryResultAudio = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.audio.InlineQueryResultAudio - -public inline fun InlineQueryResult.ifInlineQueryResultAudio(block: (InlineQueryResultAudio) -> T): T? = inlineQueryResultAudioOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultAudioCommonOrNull(): InlineQueryResultAudioCommon? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.audio.InlineQueryResultAudioCommon - -public inline fun InlineQueryResult.inlineQueryResultAudioCommonOrThrow(): InlineQueryResultAudioCommon = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.audio.InlineQueryResultAudioCommon - -public inline fun InlineQueryResult.ifInlineQueryResultAudioCommon(block: (InlineQueryResultAudioCommon) -> T): T? = inlineQueryResultAudioCommonOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultAudioCachedOrNull(): InlineQueryResultAudioCached? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.audio.InlineQueryResultAudioCached - -public inline fun InlineQueryResult.inlineQueryResultAudioCachedOrThrow(): InlineQueryResultAudioCached = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.audio.InlineQueryResultAudioCached - -public inline fun InlineQueryResult.ifInlineQueryResultAudioCached(block: (InlineQueryResultAudioCached) -> T): T? = inlineQueryResultAudioCachedOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultMpeg4GifOrNull(): InlineQueryResultMpeg4Gif? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif.InlineQueryResultMpeg4Gif - -public inline fun InlineQueryResult.inlineQueryResultMpeg4GifOrThrow(): InlineQueryResultMpeg4Gif = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif.InlineQueryResultMpeg4Gif - -public inline fun InlineQueryResult.ifInlineQueryResultMpeg4Gif(block: (InlineQueryResultMpeg4Gif) -> T): T? = inlineQueryResultMpeg4GifOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultMpeg4GifCommonOrNull(): InlineQueryResultMpeg4GifCommon? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif.InlineQueryResultMpeg4GifCommon - -public inline fun InlineQueryResult.inlineQueryResultMpeg4GifCommonOrThrow(): InlineQueryResultMpeg4GifCommon = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif.InlineQueryResultMpeg4GifCommon - -public inline fun InlineQueryResult.ifInlineQueryResultMpeg4GifCommon(block: (InlineQueryResultMpeg4GifCommon) -> T): T? = inlineQueryResultMpeg4GifCommonOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultMpeg4GifCachedOrNull(): InlineQueryResultMpeg4GifCached? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif.InlineQueryResultMpeg4GifCached - -public inline fun InlineQueryResult.inlineQueryResultMpeg4GifCachedOrThrow(): InlineQueryResultMpeg4GifCached = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif.InlineQueryResultMpeg4GifCached - -public inline fun InlineQueryResult.ifInlineQueryResultMpeg4GifCached(block: (InlineQueryResultMpeg4GifCached) -> T): T? = inlineQueryResultMpeg4GifCachedOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultPhotoCachedOrNull(): InlineQueryResultPhotoCached? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.photo.InlineQueryResultPhotoCached - -public inline fun InlineQueryResult.inlineQueryResultPhotoCachedOrThrow(): InlineQueryResultPhotoCached = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.photo.InlineQueryResultPhotoCached - -public inline fun InlineQueryResult.ifInlineQueryResultPhotoCached(block: (InlineQueryResultPhotoCached) -> T): T? = inlineQueryResultPhotoCachedOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultPhotoCommonOrNull(): InlineQueryResultPhotoCommon? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.photo.InlineQueryResultPhotoCommon - -public inline fun InlineQueryResult.inlineQueryResultPhotoCommonOrThrow(): InlineQueryResultPhotoCommon = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.photo.InlineQueryResultPhotoCommon - -public inline fun InlineQueryResult.ifInlineQueryResultPhotoCommon(block: (InlineQueryResultPhotoCommon) -> T): T? = inlineQueryResultPhotoCommonOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultPhotoOrNull(): InlineQueryResultPhoto? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.photo.InlineQueryResultPhoto - -public inline fun InlineQueryResult.inlineQueryResultPhotoOrThrow(): InlineQueryResultPhoto = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.photo.InlineQueryResultPhoto - -public inline fun InlineQueryResult.ifInlineQueryResultPhoto(block: (InlineQueryResultPhoto) -> T): T? = inlineQueryResultPhotoOrNull() ?.let(block) - -public inline fun InlineQueryResult.fileInlineQueryResultOrNull(): FileInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.FileInlineQueryResult - -public inline fun InlineQueryResult.fileInlineQueryResultOrThrow(): FileInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.FileInlineQueryResult - -public inline fun InlineQueryResult.ifFileInlineQueryResult(block: (FileInlineQueryResult) -> T): T? = fileInlineQueryResultOrNull() ?.let(block) - -public inline fun InlineQueryResult.thumbedInlineQueryResultOrNull(): ThumbedInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.ThumbedInlineQueryResult - -public inline fun InlineQueryResult.thumbedInlineQueryResultOrThrow(): ThumbedInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.ThumbedInlineQueryResult - -public inline fun InlineQueryResult.ifThumbedInlineQueryResult(block: (ThumbedInlineQueryResult) -> T): T? = thumbedInlineQueryResultOrNull() ?.let(block) - -public inline fun InlineQueryResult.thumbedWithMimeTypeInlineQueryResultOrNull(): ThumbedWithMimeTypeInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.ThumbedWithMimeTypeInlineQueryResult - -public inline fun InlineQueryResult.thumbedWithMimeTypeInlineQueryResultOrThrow(): ThumbedWithMimeTypeInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.ThumbedWithMimeTypeInlineQueryResult - -public inline fun InlineQueryResult.ifThumbedWithMimeTypeInlineQueryResult(block: (ThumbedWithMimeTypeInlineQueryResult) -> T): T? = thumbedWithMimeTypeInlineQueryResultOrNull() ?.let(block) - -public inline fun InlineQueryResult.withCustomizableCaptionInlineQueryResultOrNull(): WithCustomizableCaptionInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.WithCustomizableCaptionInlineQueryResult - -public inline fun InlineQueryResult.withCustomizableCaptionInlineQueryResultOrThrow(): WithCustomizableCaptionInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.WithCustomizableCaptionInlineQueryResult - -public inline fun InlineQueryResult.ifWithCustomizableCaptionInlineQueryResult(block: (WithCustomizableCaptionInlineQueryResult) -> T): T? = withCustomizableCaptionInlineQueryResultOrNull() ?.let(block) - -public inline fun InlineQueryResult.optionallyTitledInlineQueryResultOrNull(): OptionallyTitledInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.OptionallyTitledInlineQueryResult - -public inline fun InlineQueryResult.optionallyTitledInlineQueryResultOrThrow(): OptionallyTitledInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.OptionallyTitledInlineQueryResult - -public inline fun InlineQueryResult.ifOptionallyTitledInlineQueryResult(block: (OptionallyTitledInlineQueryResult) -> T): T? = optionallyTitledInlineQueryResultOrNull() ?.let(block) - -public inline fun InlineQueryResult.urlInlineQueryResultOrNull(): UrlInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.UrlInlineQueryResult - -public inline fun InlineQueryResult.urlInlineQueryResultOrThrow(): UrlInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.UrlInlineQueryResult - -public inline fun InlineQueryResult.ifUrlInlineQueryResult(block: (UrlInlineQueryResult) -> T): T? = urlInlineQueryResultOrNull() ?.let(block) - -public inline fun InlineQueryResult.describedInlineQueryResultOrNull(): DescribedInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.DescribedInlineQueryResult - -public inline fun InlineQueryResult.describedInlineQueryResultOrThrow(): DescribedInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.DescribedInlineQueryResult - -public inline fun InlineQueryResult.ifDescribedInlineQueryResult(block: (DescribedInlineQueryResult) -> T): T? = describedInlineQueryResultOrNull() ?.let(block) - -public inline fun InlineQueryResult.titledInlineQueryResultOrNull(): TitledInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.TitledInlineQueryResult - -public inline fun InlineQueryResult.titledInlineQueryResultOrThrow(): TitledInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.TitledInlineQueryResult - -public inline fun InlineQueryResult.ifTitledInlineQueryResult(block: (TitledInlineQueryResult) -> T): T? = titledInlineQueryResultOrNull() ?.let(block) - -public inline fun InlineQueryResult.thumbSizedInlineQueryResultOrNull(): ThumbSizedInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.ThumbSizedInlineQueryResult - -public inline fun InlineQueryResult.thumbSizedInlineQueryResultOrThrow(): ThumbSizedInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.ThumbSizedInlineQueryResult - -public inline fun InlineQueryResult.ifThumbSizedInlineQueryResult(block: (ThumbSizedInlineQueryResult) -> T): T? = thumbSizedInlineQueryResultOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultVenueOrNull(): InlineQueryResultVenue? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultVenue - -public inline fun InlineQueryResult.inlineQueryResultVenueOrThrow(): InlineQueryResultVenue = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultVenue - -public inline fun InlineQueryResult.ifInlineQueryResultVenue(block: (InlineQueryResultVenue) -> T): T? = inlineQueryResultVenueOrNull() ?.let(block) - -public inline fun InlineQueryResult.inlineQueryResultArticleOrNull(): InlineQueryResultArticle? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultArticle - -public inline fun InlineQueryResult.inlineQueryResultArticleOrThrow(): InlineQueryResultArticle = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultArticle - -public inline fun InlineQueryResult.ifInlineQueryResultArticle(block: (InlineQueryResultArticle) -> T): T? = inlineQueryResultArticleOrNull() ?.let(block) - -public inline fun InputMessageContent.inputInvoiceMessageContentOrNull(): InputInvoiceMessageContent? = this as? dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputInvoiceMessageContent - -public inline fun InputMessageContent.inputInvoiceMessageContentOrThrow(): InputInvoiceMessageContent = this as dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputInvoiceMessageContent - -public inline fun InputMessageContent.ifInputInvoiceMessageContent(block: (InputInvoiceMessageContent) -> T): T? = inputInvoiceMessageContentOrNull() ?.let(block) - -public inline fun InputMessageContent.inputContactMessageContentOrNull(): InputContactMessageContent? = this as? dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputContactMessageContent - -public inline fun InputMessageContent.inputContactMessageContentOrThrow(): InputContactMessageContent = this as dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputContactMessageContent - -public inline fun InputMessageContent.ifInputContactMessageContent(block: (InputContactMessageContent) -> T): T? = inputContactMessageContentOrNull() ?.let(block) - -public inline fun InputMessageContent.inputVenueMessageContentOrNull(): InputVenueMessageContent? = this as? dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputVenueMessageContent - -public inline fun InputMessageContent.inputVenueMessageContentOrThrow(): InputVenueMessageContent = this as dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputVenueMessageContent - -public inline fun InputMessageContent.ifInputVenueMessageContent(block: (InputVenueMessageContent) -> T): T? = inputVenueMessageContentOrNull() ?.let(block) - -public inline fun InputMessageContent.inputTextMessageContentOrNull(): InputTextMessageContent? = this as? dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputTextMessageContent - -public inline fun InputMessageContent.inputTextMessageContentOrThrow(): InputTextMessageContent = this as dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputTextMessageContent - -public inline fun InputMessageContent.ifInputTextMessageContent(block: (InputTextMessageContent) -> T): T? = inputTextMessageContentOrNull() ?.let(block) - -public inline fun InputMessageContent.inputLocationMessageContentOrNull(): InputLocationMessageContent? = this as? dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputLocationMessageContent - -public inline fun InputMessageContent.inputLocationMessageContentOrThrow(): InputLocationMessageContent = this as dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputLocationMessageContent - -public inline fun InputMessageContent.ifInputLocationMessageContent(block: (InputLocationMessageContent) -> T): T? = inputLocationMessageContentOrNull() ?.let(block) - public inline fun ForwardInfo.byAnonymousOrNull(): ForwardInfo.ByAnonymous? = this as? dev.inmo.tgbotapi.types.message.ForwardInfo.ByAnonymous public inline fun ForwardInfo.byAnonymousOrThrow(): ForwardInfo.ByAnonymous = this as dev.inmo.tgbotapi.types.message.ForwardInfo.ByAnonymous @@ -1102,6 +1332,282 @@ public inline fun ForwardInfo.fromSupergroupOrThrow(): ForwardInfo.PublicChat.Fr public inline fun ForwardInfo.ifFromSupergroup(block: (ForwardInfo.PublicChat.FromSupergroup) -> T): T? = fromSupergroupOrNull() ?.let(block) +public inline fun ResendableContent.gameContentOrNull(): GameContent? = this as? dev.inmo.tgbotapi.types.message.content.GameContent + +public inline fun ResendableContent.gameContentOrThrow(): GameContent = this as dev.inmo.tgbotapi.types.message.content.GameContent + +public inline fun ResendableContent.ifGameContent(block: (GameContent) -> T): T? = gameContentOrNull() ?.let(block) + +public inline fun ResendableContent.diceContentOrNull(): DiceContent? = this as? dev.inmo.tgbotapi.types.message.content.DiceContent + +public inline fun ResendableContent.diceContentOrThrow(): DiceContent = this as dev.inmo.tgbotapi.types.message.content.DiceContent + +public inline fun ResendableContent.ifDiceContent(block: (DiceContent) -> T): T? = diceContentOrNull() ?.let(block) + +public inline fun ResendableContent.animationContentOrNull(): AnimationContent? = this as? dev.inmo.tgbotapi.types.message.content.AnimationContent + +public inline fun ResendableContent.animationContentOrThrow(): AnimationContent = this as dev.inmo.tgbotapi.types.message.content.AnimationContent + +public inline fun ResendableContent.ifAnimationContent(block: (AnimationContent) -> T): T? = animationContentOrNull() ?.let(block) + +public inline fun ResendableContent.mediaGroupContentOrNull(): MediaGroupContent? = this as? dev.inmo.tgbotapi.types.message.content.MediaGroupContent + +public inline fun ResendableContent.mediaGroupContentOrThrow(): MediaGroupContent = this as dev.inmo.tgbotapi.types.message.content.MediaGroupContent + +public inline fun ResendableContent.ifMediaGroupContent(block: (MediaGroupContent) -> T): T? = mediaGroupContentOrNull() ?.let(block) + +public inline fun ResendableContent.videoContentOrNull(): VideoContent? = this as? dev.inmo.tgbotapi.types.message.content.VideoContent + +public inline fun ResendableContent.videoContentOrThrow(): VideoContent = this as dev.inmo.tgbotapi.types.message.content.VideoContent + +public inline fun ResendableContent.ifVideoContent(block: (VideoContent) -> T): T? = videoContentOrNull() ?.let(block) + +public inline fun ResendableContent.voiceContentOrNull(): VoiceContent? = this as? dev.inmo.tgbotapi.types.message.content.VoiceContent + +public inline fun ResendableContent.voiceContentOrThrow(): VoiceContent = this as dev.inmo.tgbotapi.types.message.content.VoiceContent + +public inline fun ResendableContent.ifVoiceContent(block: (VoiceContent) -> T): T? = voiceContentOrNull() ?.let(block) + +public inline fun ResendableContent.documentContentOrNull(): DocumentContent? = this as? dev.inmo.tgbotapi.types.message.content.DocumentContent + +public inline fun ResendableContent.documentContentOrThrow(): DocumentContent = this as dev.inmo.tgbotapi.types.message.content.DocumentContent + +public inline fun ResendableContent.ifDocumentContent(block: (DocumentContent) -> T): T? = documentContentOrNull() ?.let(block) + +public inline fun ResendableContent.messageContentOrNull(): MessageContent? = this as? dev.inmo.tgbotapi.types.message.content.MessageContent + +public inline fun ResendableContent.messageContentOrThrow(): MessageContent = this as dev.inmo.tgbotapi.types.message.content.MessageContent + +public inline fun ResendableContent.ifMessageContent(block: (MessageContent) -> T): T? = messageContentOrNull() ?.let(block) + +public inline fun ResendableContent.mediaCollectionContentOrNull(): MediaCollectionContent? = this as? dev.inmo.tgbotapi.types.message.content.MediaCollectionContent + +public inline fun ResendableContent.mediaCollectionContentOrThrow(): MediaCollectionContent = this as dev.inmo.tgbotapi.types.message.content.MediaCollectionContent + +public inline fun ResendableContent.ifMediaCollectionContent(block: (MediaCollectionContent) -> T): T? = mediaCollectionContentOrNull() ?.let(block) + +public inline fun ResendableContent.textedContentOrNull(): TextedContent? = this as? dev.inmo.tgbotapi.types.message.content.TextedContent + +public inline fun ResendableContent.textedContentOrThrow(): TextedContent = this as dev.inmo.tgbotapi.types.message.content.TextedContent + +public inline fun ResendableContent.ifTextedContent(block: (TextedContent) -> T): T? = textedContentOrNull() ?.let(block) + +public inline fun ResendableContent.mediaContentOrNull(): MediaContent? = this as? dev.inmo.tgbotapi.types.message.content.MediaContent + +public inline fun ResendableContent.mediaContentOrThrow(): MediaContent = this as dev.inmo.tgbotapi.types.message.content.MediaContent + +public inline fun ResendableContent.ifMediaContent(block: (MediaContent) -> T): T? = mediaContentOrNull() ?.let(block) + +public inline fun ResendableContent.spoilerableMediaContentOrNull(): SpoilerableMediaContent? = this as? dev.inmo.tgbotapi.types.message.content.SpoilerableMediaContent + +public inline fun ResendableContent.spoilerableMediaContentOrThrow(): SpoilerableMediaContent = this as dev.inmo.tgbotapi.types.message.content.SpoilerableMediaContent + +public inline fun ResendableContent.ifSpoilerableMediaContent(block: (SpoilerableMediaContent) -> T): T? = spoilerableMediaContentOrNull() ?.let(block) + +public inline fun ResendableContent.withCustomizedCaptionMediaContentOrNull(): WithCustomizedCaptionMediaContent? = this as? dev.inmo.tgbotapi.types.message.content.WithCustomizedCaptionMediaContent + +public inline fun ResendableContent.withCustomizedCaptionMediaContentOrThrow(): WithCustomizedCaptionMediaContent = this as dev.inmo.tgbotapi.types.message.content.WithCustomizedCaptionMediaContent + +public inline fun ResendableContent.ifWithCustomizedCaptionMediaContent(block: (WithCustomizedCaptionMediaContent) -> T): T? = withCustomizedCaptionMediaContentOrNull() ?.let(block) + +public inline fun ResendableContent.audioContentOrNull(): AudioContent? = this as? dev.inmo.tgbotapi.types.message.content.AudioContent + +public inline fun ResendableContent.audioContentOrThrow(): AudioContent = this as dev.inmo.tgbotapi.types.message.content.AudioContent + +public inline fun ResendableContent.ifAudioContent(block: (AudioContent) -> T): T? = audioContentOrNull() ?.let(block) + +public inline fun ResendableContent.storyContentOrNull(): StoryContent? = this as? dev.inmo.tgbotapi.types.message.content.StoryContent + +public inline fun ResendableContent.storyContentOrThrow(): StoryContent = this as dev.inmo.tgbotapi.types.message.content.StoryContent + +public inline fun ResendableContent.ifStoryContent(block: (StoryContent) -> T): T? = storyContentOrNull() ?.let(block) + +public inline fun ResendableContent.contactContentOrNull(): ContactContent? = this as? dev.inmo.tgbotapi.types.message.content.ContactContent + +public inline fun ResendableContent.contactContentOrThrow(): ContactContent = this as dev.inmo.tgbotapi.types.message.content.ContactContent + +public inline fun ResendableContent.ifContactContent(block: (ContactContent) -> T): T? = contactContentOrNull() ?.let(block) + +public inline fun ResendableContent.pollContentOrNull(): PollContent? = this as? dev.inmo.tgbotapi.types.message.content.PollContent + +public inline fun ResendableContent.pollContentOrThrow(): PollContent = this as dev.inmo.tgbotapi.types.message.content.PollContent + +public inline fun ResendableContent.ifPollContent(block: (PollContent) -> T): T? = pollContentOrNull() ?.let(block) + +public inline fun ResendableContent.invoiceContentOrNull(): InvoiceContent? = this as? dev.inmo.tgbotapi.types.message.content.InvoiceContent + +public inline fun ResendableContent.invoiceContentOrThrow(): InvoiceContent = this as dev.inmo.tgbotapi.types.message.content.InvoiceContent + +public inline fun ResendableContent.ifInvoiceContent(block: (InvoiceContent) -> T): T? = invoiceContentOrNull() ?.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 ResendableContent.ifChecklistContent(block: (ChecklistContent) -> T): T? = checklistContentOrNull() ?.let(block) + +public inline fun ResendableContent.livePhotoContentOrNull(): LivePhotoContent? = this as? dev.inmo.tgbotapi.types.message.content.LivePhotoContent + +public inline fun ResendableContent.livePhotoContentOrThrow(): LivePhotoContent = this as dev.inmo.tgbotapi.types.message.content.LivePhotoContent + +public inline fun ResendableContent.ifLivePhotoContent(block: (LivePhotoContent) -> T): T? = livePhotoContentOrNull() ?.let(block) + +public inline fun ResendableContent.videoNoteContentOrNull(): VideoNoteContent? = this as? dev.inmo.tgbotapi.types.message.content.VideoNoteContent + +public inline fun ResendableContent.videoNoteContentOrThrow(): VideoNoteContent = this as dev.inmo.tgbotapi.types.message.content.VideoNoteContent + +public inline fun ResendableContent.ifVideoNoteContent(block: (VideoNoteContent) -> T): T? = videoNoteContentOrNull() ?.let(block) + +public inline fun ResendableContent.giveawayContentOrNull(): GiveawayContent? = this as? dev.inmo.tgbotapi.types.message.content.GiveawayContent + +public inline fun ResendableContent.giveawayContentOrThrow(): GiveawayContent = this as dev.inmo.tgbotapi.types.message.content.GiveawayContent + +public inline fun ResendableContent.ifGiveawayContent(block: (GiveawayContent) -> T): T? = giveawayContentOrNull() ?.let(block) + +public inline fun ResendableContent.textContentOrNull(): TextContent? = this as? dev.inmo.tgbotapi.types.message.content.TextContent + +public inline fun ResendableContent.textContentOrThrow(): TextContent = this as dev.inmo.tgbotapi.types.message.content.TextContent + +public inline fun ResendableContent.ifTextContent(block: (TextContent) -> T): T? = textContentOrNull() ?.let(block) + +public inline fun ResendableContent.paidMediaInfoContentOrNull(): PaidMediaInfoContent? = this as? dev.inmo.tgbotapi.types.message.content.PaidMediaInfoContent + +public inline fun ResendableContent.paidMediaInfoContentOrThrow(): PaidMediaInfoContent = this as dev.inmo.tgbotapi.types.message.content.PaidMediaInfoContent + +public inline fun ResendableContent.ifPaidMediaInfoContent(block: (PaidMediaInfoContent) -> T): T? = paidMediaInfoContentOrNull() ?.let(block) + +public inline fun ResendableContent.giveawayPublicResultsContentOrNull(): GiveawayPublicResultsContent? = this as? dev.inmo.tgbotapi.types.message.content.GiveawayPublicResultsContent + +public inline fun ResendableContent.giveawayPublicResultsContentOrThrow(): GiveawayPublicResultsContent = this as dev.inmo.tgbotapi.types.message.content.GiveawayPublicResultsContent + +public inline fun ResendableContent.ifGiveawayPublicResultsContent(block: (GiveawayPublicResultsContent) -> T): T? = giveawayPublicResultsContentOrNull() ?.let(block) + +public inline fun ResendableContent.photoContentOrNull(): PhotoContent? = this as? dev.inmo.tgbotapi.types.message.content.PhotoContent + +public inline fun ResendableContent.photoContentOrThrow(): PhotoContent = this as dev.inmo.tgbotapi.types.message.content.PhotoContent + +public inline fun ResendableContent.ifPhotoContent(block: (PhotoContent) -> T): T? = photoContentOrNull() ?.let(block) + +public inline fun ResendableContent.audioMediaGroupPartContentOrNull(): AudioMediaGroupPartContent? = this as? dev.inmo.tgbotapi.types.message.content.AudioMediaGroupPartContent + +public inline fun ResendableContent.audioMediaGroupPartContentOrThrow(): AudioMediaGroupPartContent = this as dev.inmo.tgbotapi.types.message.content.AudioMediaGroupPartContent + +public inline fun ResendableContent.ifAudioMediaGroupPartContent(block: (AudioMediaGroupPartContent) -> T): T? = audioMediaGroupPartContentOrNull() ?.let(block) + +public inline fun ResendableContent.documentMediaGroupPartContentOrNull(): DocumentMediaGroupPartContent? = this as? dev.inmo.tgbotapi.types.message.content.DocumentMediaGroupPartContent + +public inline fun ResendableContent.documentMediaGroupPartContentOrThrow(): DocumentMediaGroupPartContent = this as dev.inmo.tgbotapi.types.message.content.DocumentMediaGroupPartContent + +public inline fun ResendableContent.ifDocumentMediaGroupPartContent(block: (DocumentMediaGroupPartContent) -> T): T? = documentMediaGroupPartContentOrNull() ?.let(block) + +public inline fun ResendableContent.textedMediaContentOrNull(): TextedMediaContent? = this as? dev.inmo.tgbotapi.types.message.content.TextedMediaContent + +public inline fun ResendableContent.textedMediaContentOrThrow(): TextedMediaContent = this as dev.inmo.tgbotapi.types.message.content.TextedMediaContent + +public inline fun ResendableContent.ifTextedMediaContent(block: (TextedMediaContent) -> T): T? = textedMediaContentOrNull() ?.let(block) + +public inline fun ResendableContent.mediaGroupCollectionContentOrNull(): MediaGroupCollectionContent? = this as? dev.inmo.tgbotapi.types.message.content.MediaGroupCollectionContent + +public inline fun ResendableContent.mediaGroupCollectionContentOrThrow(): MediaGroupCollectionContent = this as dev.inmo.tgbotapi.types.message.content.MediaGroupCollectionContent + +public inline fun ResendableContent.ifMediaGroupCollectionContent(block: (MediaGroupCollectionContent) -> T): T? = mediaGroupCollectionContentOrNull() ?.let(block) + +public inline fun ResendableContent.mediaGroupPartContentOrNull(): MediaGroupPartContent? = this as? dev.inmo.tgbotapi.types.message.content.MediaGroupPartContent + +public inline fun ResendableContent.mediaGroupPartContentOrThrow(): MediaGroupPartContent = this as dev.inmo.tgbotapi.types.message.content.MediaGroupPartContent + +public inline fun ResendableContent.ifMediaGroupPartContent(block: (MediaGroupPartContent) -> T): T? = mediaGroupPartContentOrNull() ?.let(block) + +public inline fun ResendableContent.visualMediaGroupPartContentOrNull(): VisualMediaGroupPartContent? = this as? dev.inmo.tgbotapi.types.message.content.VisualMediaGroupPartContent + +public inline fun ResendableContent.visualMediaGroupPartContentOrThrow(): VisualMediaGroupPartContent = this as dev.inmo.tgbotapi.types.message.content.VisualMediaGroupPartContent + +public inline fun ResendableContent.ifVisualMediaGroupPartContent(block: (VisualMediaGroupPartContent) -> T): T? = visualMediaGroupPartContentOrNull() ?.let(block) + +public inline fun ResendableContent.venueContentOrNull(): VenueContent? = this as? dev.inmo.tgbotapi.types.message.content.VenueContent + +public inline fun ResendableContent.venueContentOrThrow(): VenueContent = this as dev.inmo.tgbotapi.types.message.content.VenueContent + +public inline fun ResendableContent.ifVenueContent(block: (VenueContent) -> T): T? = venueContentOrNull() ?.let(block) + +public inline fun ResendableContent.stickerContentOrNull(): StickerContent? = this as? dev.inmo.tgbotapi.types.message.content.StickerContent + +public inline fun ResendableContent.stickerContentOrThrow(): StickerContent = this as dev.inmo.tgbotapi.types.message.content.StickerContent + +public inline fun ResendableContent.ifStickerContent(block: (StickerContent) -> T): T? = stickerContentOrNull() ?.let(block) + +public inline fun ResendableContent.locationContentOrNull(): LocationContent? = this as? dev.inmo.tgbotapi.types.message.content.LocationContent + +public inline fun ResendableContent.locationContentOrThrow(): LocationContent = this as dev.inmo.tgbotapi.types.message.content.LocationContent + +public inline fun ResendableContent.ifLocationContent(block: (LocationContent) -> T): T? = locationContentOrNull() ?.let(block) + +public inline fun ResendableContent.liveLocationContentOrNull(): LiveLocationContent? = this as? dev.inmo.tgbotapi.types.message.content.LiveLocationContent + +public inline fun ResendableContent.liveLocationContentOrThrow(): LiveLocationContent = this as dev.inmo.tgbotapi.types.message.content.LiveLocationContent + +public inline fun ResendableContent.ifLiveLocationContent(block: (LiveLocationContent) -> T): T? = liveLocationContentOrNull() ?.let(block) + +public inline fun ResendableContent.staticLocationContentOrNull(): StaticLocationContent? = this as? dev.inmo.tgbotapi.types.message.content.StaticLocationContent + +public inline fun ResendableContent.staticLocationContentOrThrow(): StaticLocationContent = this as dev.inmo.tgbotapi.types.message.content.StaticLocationContent + +public inline fun ResendableContent.ifStaticLocationContent(block: (StaticLocationContent) -> T): T? = staticLocationContentOrNull() ?.let(block) + +public inline fun ChatEvent.chatSharedRequestOrNull(): ChatSharedRequest? = this as? dev.inmo.tgbotapi.types.request.ChatSharedRequest + +public inline fun ChatEvent.chatSharedRequestOrThrow(): ChatSharedRequest = this as dev.inmo.tgbotapi.types.request.ChatSharedRequest + +public inline fun ChatEvent.ifChatSharedRequest(block: (ChatSharedRequest) -> T): T? = chatSharedRequestOrNull() ?.let(block) + +public inline fun ChatEvent.chatSharedOrNull(): ChatShared? = this as? dev.inmo.tgbotapi.types.request.ChatShared + +public inline fun ChatEvent.chatSharedOrThrow(): ChatShared = this as dev.inmo.tgbotapi.types.request.ChatShared + +public inline fun ChatEvent.ifChatShared(block: (ChatShared) -> T): T? = chatSharedOrNull() ?.let(block) + +public inline fun ChatEvent.usersSharedOrNull(): UsersShared? = this as? dev.inmo.tgbotapi.types.request.UsersShared + +public inline fun ChatEvent.usersSharedOrThrow(): UsersShared = this as dev.inmo.tgbotapi.types.request.UsersShared + +public inline fun ChatEvent.ifUsersShared(block: (UsersShared) -> T): T? = usersSharedOrNull() ?.let(block) + +public inline fun ChatEvent.giveawayCreatedOrNull(): GiveawayCreated? = this as? dev.inmo.tgbotapi.types.giveaway.GiveawayCreated + +public inline fun ChatEvent.giveawayCreatedOrThrow(): GiveawayCreated = this as dev.inmo.tgbotapi.types.giveaway.GiveawayCreated + +public inline fun ChatEvent.ifGiveawayCreated(block: (GiveawayCreated) -> T): T? = giveawayCreatedOrNull() ?.let(block) + +public inline fun ChatEvent.giveawayCreatedStarsOrNull(): GiveawayCreated.Stars? = this as? dev.inmo.tgbotapi.types.giveaway.GiveawayCreated.Stars + +public inline fun ChatEvent.giveawayCreatedStarsOrThrow(): GiveawayCreated.Stars = this as dev.inmo.tgbotapi.types.giveaway.GiveawayCreated.Stars + +public inline fun ChatEvent.ifGiveawayCreatedStars(block: (GiveawayCreated.Stars) -> T): T? = giveawayCreatedStarsOrNull() ?.let(block) + +public inline fun ChatEvent.giveawayCreatedCompanionOrNull(): GiveawayCreated.Companion? = this as? dev.inmo.tgbotapi.types.giveaway.GiveawayCreated.Companion + +public inline fun ChatEvent.giveawayCreatedCompanionOrThrow(): GiveawayCreated.Companion = this as dev.inmo.tgbotapi.types.giveaway.GiveawayCreated.Companion + +public inline fun ChatEvent.ifGiveawayCreatedCompanion(block: (GiveawayCreated.Companion) -> T): T? = giveawayCreatedCompanionOrNull() ?.let(block) + +public inline fun ChatEvent.giveawayPrivateResultsOrNull(): GiveawayPrivateResults? = this as? dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults + +public inline fun ChatEvent.giveawayPrivateResultsOrThrow(): GiveawayPrivateResults = this as dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults + +public inline fun ChatEvent.ifGiveawayPrivateResults(block: (GiveawayPrivateResults) -> T): T? = giveawayPrivateResultsOrNull() ?.let(block) + +public inline fun ChatEvent.pollOptionAddedOrNull(): PollOptionAdded? = this as? dev.inmo.tgbotapi.types.polls.PollOptionAdded + +public inline fun ChatEvent.pollOptionAddedOrThrow(): PollOptionAdded = this as dev.inmo.tgbotapi.types.polls.PollOptionAdded + +public inline fun ChatEvent.ifPollOptionAdded(block: (PollOptionAdded) -> T): T? = pollOptionAddedOrNull() ?.let(block) + +public inline fun ChatEvent.pollOptionDeletedOrNull(): PollOptionDeleted? = this as? dev.inmo.tgbotapi.types.polls.PollOptionDeleted + +public inline fun ChatEvent.pollOptionDeletedOrThrow(): PollOptionDeleted = this as dev.inmo.tgbotapi.types.polls.PollOptionDeleted + +public inline fun ChatEvent.ifPollOptionDeleted(block: (PollOptionDeleted) -> T): T? = pollOptionDeletedOrNull() ?.let(block) + public inline fun ChatEvent.successfulPaymentEventOrNull(): SuccessfulPaymentEvent? = this as? dev.inmo.tgbotapi.types.message.payments.SuccessfulPaymentEvent public inline fun ChatEvent.successfulPaymentEventOrThrow(): SuccessfulPaymentEvent = this as dev.inmo.tgbotapi.types.message.payments.SuccessfulPaymentEvent @@ -1114,29 +1620,77 @@ public inline fun ChatEvent.refundedPaymentEventOrThrow(): RefundedPaymentEvent public inline fun ChatEvent.ifRefundedPaymentEvent(block: (RefundedPaymentEvent) -> T): T? = refundedPaymentEventOrNull() ?.let(block) +public inline fun ChatEvent.supergroupChatCreatedOrNull(): SupergroupChatCreated? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.SupergroupChatCreated + +public inline fun ChatEvent.supergroupChatCreatedOrThrow(): SupergroupChatCreated = this as dev.inmo.tgbotapi.types.message.ChatEvents.SupergroupChatCreated + +public inline fun ChatEvent.ifSupergroupChatCreated(block: (SupergroupChatCreated) -> T): T? = supergroupChatCreatedOrNull() ?.let(block) + public inline fun ChatEvent.chatOwnerLeftOrNull(): ChatOwnerLeft? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.ChatOwnerLeft public inline fun ChatEvent.chatOwnerLeftOrThrow(): ChatOwnerLeft = this as dev.inmo.tgbotapi.types.message.ChatEvents.ChatOwnerLeft public inline fun ChatEvent.ifChatOwnerLeft(block: (ChatOwnerLeft) -> T): T? = chatOwnerLeftOrNull() ?.let(block) +public inline fun ChatEvent.messageAutoDeleteTimerChangedOrNull(): MessageAutoDeleteTimerChanged? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.MessageAutoDeleteTimerChanged + +public inline fun ChatEvent.messageAutoDeleteTimerChangedOrThrow(): MessageAutoDeleteTimerChanged = this as dev.inmo.tgbotapi.types.message.ChatEvents.MessageAutoDeleteTimerChanged + +public inline fun ChatEvent.ifMessageAutoDeleteTimerChanged(block: (MessageAutoDeleteTimerChanged) -> T): T? = messageAutoDeleteTimerChangedOrNull() ?.let(block) + public inline fun ChatEvent.groupChatCreatedOrNull(): GroupChatCreated? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.GroupChatCreated public inline fun ChatEvent.groupChatCreatedOrThrow(): GroupChatCreated = this as dev.inmo.tgbotapi.types.message.ChatEvents.GroupChatCreated public inline fun ChatEvent.ifGroupChatCreated(block: (GroupChatCreated) -> T): T? = groupChatCreatedOrNull() ?.let(block) -public inline fun ChatEvent.newChatMembersOrNull(): NewChatMembers? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.NewChatMembers +public inline fun ChatEvent.leftChatMemberEventOrNull(): LeftChatMemberEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.LeftChatMemberEvent -public inline fun ChatEvent.newChatMembersOrThrow(): NewChatMembers = this as dev.inmo.tgbotapi.types.message.ChatEvents.NewChatMembers +public inline fun ChatEvent.leftChatMemberEventOrThrow(): LeftChatMemberEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.LeftChatMemberEvent -public inline fun ChatEvent.ifNewChatMembers(block: (NewChatMembers) -> T): T? = newChatMembersOrNull() ?.let(block) +public inline fun ChatEvent.ifLeftChatMemberEvent(block: (LeftChatMemberEvent) -> T): T? = leftChatMemberEventOrNull() ?.let(block) -public inline fun ChatEvent.generalForumTopicUnhiddenOrNull(): GeneralForumTopicUnhidden? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicUnhidden +public inline fun ChatEvent.videoChatEndedOrNull(): VideoChatEnded? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatEnded -public inline fun ChatEvent.generalForumTopicUnhiddenOrThrow(): GeneralForumTopicUnhidden = this as dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicUnhidden +public inline fun ChatEvent.videoChatEndedOrThrow(): VideoChatEnded = this as dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatEnded -public inline fun ChatEvent.ifGeneralForumTopicUnhidden(block: (GeneralForumTopicUnhidden) -> T): T? = generalForumTopicUnhiddenOrNull() ?.let(block) +public inline fun ChatEvent.ifVideoChatEnded(block: (VideoChatEnded) -> T): T? = videoChatEndedOrNull() ?.let(block) + +public inline fun ChatEvent.videoChatScheduledOrNull(): VideoChatScheduled? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatScheduled + +public inline fun ChatEvent.videoChatScheduledOrThrow(): VideoChatScheduled = this as dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatScheduled + +public inline fun ChatEvent.ifVideoChatScheduled(block: (VideoChatScheduled) -> T): T? = videoChatScheduledOrNull() ?.let(block) + +public inline fun ChatEvent.videoChatStartedOrNull(): VideoChatStarted? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatStarted + +public inline fun ChatEvent.videoChatStartedOrThrow(): VideoChatStarted = this as dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatStarted + +public inline fun ChatEvent.ifVideoChatStarted(block: (VideoChatStarted) -> T): T? = videoChatStartedOrNull() ?.let(block) + +public inline fun ChatEvent.videoChatParticipantsInvitedOrNull(): VideoChatParticipantsInvited? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatParticipantsInvited + +public inline fun ChatEvent.videoChatParticipantsInvitedOrThrow(): VideoChatParticipantsInvited = this as dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatParticipantsInvited + +public inline fun ChatEvent.ifVideoChatParticipantsInvited(block: (VideoChatParticipantsInvited) -> T): T? = videoChatParticipantsInvitedOrNull() ?.let(block) + +public inline fun ChatEvent.migratedToSupergroupOrNull(): MigratedToSupergroup? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.MigratedToSupergroup + +public inline fun ChatEvent.migratedToSupergroupOrThrow(): MigratedToSupergroup = this as dev.inmo.tgbotapi.types.message.ChatEvents.MigratedToSupergroup + +public inline fun ChatEvent.ifMigratedToSupergroup(block: (MigratedToSupergroup) -> T): T? = migratedToSupergroupOrNull() ?.let(block) + +public inline fun ChatEvent.forumTopicEditedOrNull(): ForumTopicEdited? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicEdited + +public inline fun ChatEvent.forumTopicEditedOrThrow(): ForumTopicEdited = this as dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicEdited + +public inline fun ChatEvent.ifForumTopicEdited(block: (ForumTopicEdited) -> T): T? = forumTopicEditedOrNull() ?.let(block) + +public inline fun ChatEvent.forumTopicClosedOrNull(): ForumTopicClosed? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicClosed + +public inline fun ChatEvent.forumTopicClosedOrThrow(): ForumTopicClosed = this as dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicClosed + +public inline fun ChatEvent.ifForumTopicClosed(block: (ForumTopicClosed) -> T): T? = forumTopicClosedOrNull() ?.let(block) public inline fun ChatEvent.forumTopicCreatedOrNull(): ForumTopicCreated? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicCreated @@ -1144,12 +1698,24 @@ public inline fun ChatEvent.forumTopicCreatedOrThrow(): ForumTopicCreated = this public inline fun ChatEvent.ifForumTopicCreated(block: (ForumTopicCreated) -> T): T? = forumTopicCreatedOrNull() ?.let(block) +public inline fun ChatEvent.generalForumTopicUnhiddenOrNull(): GeneralForumTopicUnhidden? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicUnhidden + +public inline fun ChatEvent.generalForumTopicUnhiddenOrThrow(): GeneralForumTopicUnhidden = this as dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicUnhidden + +public inline fun ChatEvent.ifGeneralForumTopicUnhidden(block: (GeneralForumTopicUnhidden) -> T): T? = generalForumTopicUnhiddenOrNull() ?.let(block) + public inline fun ChatEvent.forumTopicReopenedOrNull(): ForumTopicReopened? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicReopened public inline fun ChatEvent.forumTopicReopenedOrThrow(): ForumTopicReopened = this as dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicReopened public inline fun ChatEvent.ifForumTopicReopened(block: (ForumTopicReopened) -> T): T? = forumTopicReopenedOrNull() ?.let(block) +public inline fun ChatEvent.generalForumTopicHiddenOrNull(): GeneralForumTopicHidden? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicHidden + +public inline fun ChatEvent.generalForumTopicHiddenOrThrow(): GeneralForumTopicHidden = this as dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicHidden + +public inline fun ChatEvent.ifGeneralForumTopicHidden(block: (GeneralForumTopicHidden) -> T): T? = generalForumTopicHiddenOrNull() ?.let(block) + public inline fun ChatEvent.writeAccessAllowedOrNull(): WriteAccessAllowed? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.forum.WriteAccessAllowed public inline fun ChatEvent.writeAccessAllowedOrThrow(): WriteAccessAllowed = this as dev.inmo.tgbotapi.types.message.ChatEvents.forum.WriteAccessAllowed @@ -1180,23 +1746,11 @@ public inline fun ChatEvent.writeAccessAllowedFromAttachmentMenuOrThrow(): Write public inline fun ChatEvent.ifWriteAccessAllowedFromAttachmentMenu(block: (WriteAccessAllowed.FromAttachmentMenu) -> T): T? = writeAccessAllowedFromAttachmentMenuOrNull() ?.let(block) -public inline fun ChatEvent.forumTopicClosedOrNull(): ForumTopicClosed? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicClosed +public inline fun ChatEvent.newChatMembersOrNull(): NewChatMembers? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.NewChatMembers -public inline fun ChatEvent.forumTopicClosedOrThrow(): ForumTopicClosed = this as dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicClosed +public inline fun ChatEvent.newChatMembersOrThrow(): NewChatMembers = this as dev.inmo.tgbotapi.types.message.ChatEvents.NewChatMembers -public inline fun ChatEvent.ifForumTopicClosed(block: (ForumTopicClosed) -> T): T? = forumTopicClosedOrNull() ?.let(block) - -public inline fun ChatEvent.generalForumTopicHiddenOrNull(): GeneralForumTopicHidden? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicHidden - -public inline fun ChatEvent.generalForumTopicHiddenOrThrow(): GeneralForumTopicHidden = this as dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicHidden - -public inline fun ChatEvent.ifGeneralForumTopicHidden(block: (GeneralForumTopicHidden) -> T): T? = generalForumTopicHiddenOrNull() ?.let(block) - -public inline fun ChatEvent.forumTopicEditedOrNull(): ForumTopicEdited? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicEdited - -public inline fun ChatEvent.forumTopicEditedOrThrow(): ForumTopicEdited = this as dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicEdited - -public inline fun ChatEvent.ifForumTopicEdited(block: (ForumTopicEdited) -> T): T? = forumTopicEditedOrNull() ?.let(block) +public inline fun ChatEvent.ifNewChatMembers(block: (NewChatMembers) -> T): T? = newChatMembersOrNull() ?.let(block) public inline fun ChatEvent.chatBoostAddedOrNull(): ChatBoostAdded? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.ChatBoostAdded @@ -1204,167 +1758,11 @@ public inline fun ChatEvent.chatBoostAddedOrThrow(): ChatBoostAdded = this as de public inline fun ChatEvent.ifChatBoostAdded(block: (ChatBoostAdded) -> T): T? = chatBoostAddedOrNull() ?.let(block) -public inline fun ChatEvent.newChatPhotoOrNull(): NewChatPhoto? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.NewChatPhoto +public inline fun ChatEvent.suggestedPostApprovalFailedOrNull(): SuggestedPostApprovalFailed? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostApprovalFailed -public inline fun ChatEvent.newChatPhotoOrThrow(): NewChatPhoto = this as dev.inmo.tgbotapi.types.message.ChatEvents.NewChatPhoto +public inline fun ChatEvent.suggestedPostApprovalFailedOrThrow(): SuggestedPostApprovalFailed = this as dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostApprovalFailed -public inline fun ChatEvent.ifNewChatPhoto(block: (NewChatPhoto) -> T): T? = newChatPhotoOrNull() ?.let(block) - -public inline fun ChatEvent.leftChatMemberEventOrNull(): LeftChatMemberEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.LeftChatMemberEvent - -public inline fun ChatEvent.leftChatMemberEventOrThrow(): LeftChatMemberEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.LeftChatMemberEvent - -public inline fun ChatEvent.ifLeftChatMemberEvent(block: (LeftChatMemberEvent) -> T): T? = leftChatMemberEventOrNull() ?.let(block) - -public inline fun ChatEvent.supergroupChatCreatedOrNull(): SupergroupChatCreated? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.SupergroupChatCreated - -public inline fun ChatEvent.supergroupChatCreatedOrThrow(): SupergroupChatCreated = this as dev.inmo.tgbotapi.types.message.ChatEvents.SupergroupChatCreated - -public inline fun ChatEvent.ifSupergroupChatCreated(block: (SupergroupChatCreated) -> T): T? = supergroupChatCreatedOrNull() ?.let(block) - -public inline fun ChatEvent.proximityAlertTriggeredOrNull(): ProximityAlertTriggered? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.ProximityAlertTriggered - -public inline fun ChatEvent.proximityAlertTriggeredOrThrow(): ProximityAlertTriggered = this as dev.inmo.tgbotapi.types.message.ChatEvents.ProximityAlertTriggered - -public inline fun ChatEvent.ifProximityAlertTriggered(block: (ProximityAlertTriggered) -> T): T? = proximityAlertTriggeredOrNull() ?.let(block) - -public inline fun ChatEvent.videoChatParticipantsInvitedOrNull(): VideoChatParticipantsInvited? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatParticipantsInvited - -public inline fun ChatEvent.videoChatParticipantsInvitedOrThrow(): VideoChatParticipantsInvited = this as dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatParticipantsInvited - -public inline fun ChatEvent.ifVideoChatParticipantsInvited(block: (VideoChatParticipantsInvited) -> T): T? = videoChatParticipantsInvitedOrNull() ?.let(block) - -public inline fun ChatEvent.videoChatEndedOrNull(): VideoChatEnded? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatEnded - -public inline fun ChatEvent.videoChatEndedOrThrow(): VideoChatEnded = this as dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatEnded - -public inline fun ChatEvent.ifVideoChatEnded(block: (VideoChatEnded) -> T): T? = videoChatEndedOrNull() ?.let(block) - -public inline fun ChatEvent.videoChatScheduledOrNull(): VideoChatScheduled? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatScheduled - -public inline fun ChatEvent.videoChatScheduledOrThrow(): VideoChatScheduled = this as dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatScheduled - -public inline fun ChatEvent.ifVideoChatScheduled(block: (VideoChatScheduled) -> T): T? = videoChatScheduledOrNull() ?.let(block) - -public inline fun ChatEvent.videoChatStartedOrNull(): VideoChatStarted? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatStarted - -public inline fun ChatEvent.videoChatStartedOrThrow(): VideoChatStarted = this as dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatStarted - -public inline fun ChatEvent.ifVideoChatStarted(block: (VideoChatStarted) -> T): T? = videoChatStartedOrNull() ?.let(block) - -public inline fun ChatEvent.migratedToSupergroupOrNull(): MigratedToSupergroup? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.MigratedToSupergroup - -public inline fun ChatEvent.migratedToSupergroupOrThrow(): MigratedToSupergroup = this as dev.inmo.tgbotapi.types.message.ChatEvents.MigratedToSupergroup - -public inline fun ChatEvent.ifMigratedToSupergroup(block: (MigratedToSupergroup) -> T): T? = migratedToSupergroupOrNull() ?.let(block) - -public inline fun ChatEvent.pinnedMessageOrNull(): PinnedMessage? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.PinnedMessage - -public inline fun ChatEvent.pinnedMessageOrThrow(): PinnedMessage = this as dev.inmo.tgbotapi.types.message.ChatEvents.PinnedMessage - -public inline fun ChatEvent.ifPinnedMessage(block: (PinnedMessage) -> T): T? = pinnedMessageOrNull() ?.let(block) - -public inline fun ChatEvent.userLoggedInOrNull(): UserLoggedIn? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.UserLoggedIn - -public inline fun ChatEvent.userLoggedInOrThrow(): UserLoggedIn = this as dev.inmo.tgbotapi.types.message.ChatEvents.UserLoggedIn - -public inline fun ChatEvent.ifUserLoggedIn(block: (UserLoggedIn) -> T): T? = userLoggedInOrNull() ?.let(block) - -public inline fun ChatEvent.chatOwnerChangedOrNull(): ChatOwnerChanged? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.ChatOwnerChanged - -public inline fun ChatEvent.chatOwnerChangedOrThrow(): ChatOwnerChanged = this as dev.inmo.tgbotapi.types.message.ChatEvents.ChatOwnerChanged - -public inline fun ChatEvent.ifChatOwnerChanged(block: (ChatOwnerChanged) -> T): T? = chatOwnerChangedOrNull() ?.let(block) - -public inline fun ChatEvent.groupEventOrNull(): GroupEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.GroupEvent - -public inline fun ChatEvent.groupEventOrThrow(): GroupEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.GroupEvent - -public inline fun ChatEvent.ifGroupEvent(block: (GroupEvent) -> T): T? = groupEventOrNull() ?.let(block) - -public inline fun ChatEvent.videoChatEventOrNull(): VideoChatEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.VideoChatEvent - -public inline fun ChatEvent.videoChatEventOrThrow(): VideoChatEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.VideoChatEvent - -public inline fun ChatEvent.ifVideoChatEvent(block: (VideoChatEvent) -> T): T? = videoChatEventOrNull() ?.let(block) - -public inline fun ChatEvent.privateForumEventOrNull(): PrivateForumEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.PrivateForumEvent - -public inline fun ChatEvent.privateForumEventOrThrow(): PrivateForumEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.PrivateForumEvent - -public inline fun ChatEvent.ifPrivateForumEvent(block: (PrivateForumEvent) -> T): T? = privateForumEventOrNull() ?.let(block) - -public inline fun ChatEvent.supergroupEventOrNull(): SupergroupEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.SupergroupEvent - -public inline fun ChatEvent.supergroupEventOrThrow(): SupergroupEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.SupergroupEvent - -public inline fun ChatEvent.ifSupergroupEvent(block: (SupergroupEvent) -> T): T? = supergroupEventOrNull() ?.let(block) - -public inline fun ChatEvent.forumEventOrNull(): ForumEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ForumEvent - -public inline fun ChatEvent.forumEventOrThrow(): ForumEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ForumEvent - -public inline fun ChatEvent.ifForumEvent(block: (ForumEvent) -> T): T? = forumEventOrNull() ?.let(block) - -public inline fun ChatEvent.publicChatEventOrNull(): PublicChatEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.PublicChatEvent - -public inline fun ChatEvent.publicChatEventOrThrow(): PublicChatEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.PublicChatEvent - -public inline fun ChatEvent.ifPublicChatEvent(block: (PublicChatEvent) -> T): T? = publicChatEventOrNull() ?.let(block) - -public inline fun ChatEvent.channelEventOrNull(): ChannelEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ChannelEvent - -public inline fun ChatEvent.channelEventOrThrow(): ChannelEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ChannelEvent - -public inline fun ChatEvent.ifChannelEvent(block: (ChannelEvent) -> T): T? = channelEventOrNull() ?.let(block) - -public inline fun ChatEvent.channelDirectMessagesEventOrNull(): ChannelDirectMessagesEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ChannelDirectMessagesEvent - -public inline fun ChatEvent.channelDirectMessagesEventOrThrow(): ChannelDirectMessagesEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ChannelDirectMessagesEvent - -public inline fun ChatEvent.ifChannelDirectMessagesEvent(block: (ChannelDirectMessagesEvent) -> T): T? = channelDirectMessagesEventOrNull() ?.let(block) - -public inline fun ChatEvent.commonEventOrNull(): CommonEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.CommonEvent - -public inline fun ChatEvent.commonEventOrThrow(): CommonEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.CommonEvent - -public inline fun ChatEvent.ifCommonEvent(block: (CommonEvent) -> T): T? = commonEventOrNull() ?.let(block) - -public inline fun ChatEvent.privateEventOrNull(): PrivateEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.PrivateEvent - -public inline fun ChatEvent.privateEventOrThrow(): PrivateEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.PrivateEvent - -public inline fun ChatEvent.ifPrivateEvent(block: (PrivateEvent) -> T): T? = privateEventOrNull() ?.let(block) - -public inline fun ChatEvent.webAppDataOrNull(): WebAppData? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.WebAppData - -public inline fun ChatEvent.webAppDataOrThrow(): WebAppData = this as dev.inmo.tgbotapi.types.message.ChatEvents.WebAppData - -public inline fun ChatEvent.ifWebAppData(block: (WebAppData) -> T): T? = webAppDataOrNull() ?.let(block) - -public inline fun ChatEvent.newChatTitleOrNull(): NewChatTitle? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.NewChatTitle - -public inline fun ChatEvent.newChatTitleOrThrow(): NewChatTitle = this as dev.inmo.tgbotapi.types.message.ChatEvents.NewChatTitle - -public inline fun ChatEvent.ifNewChatTitle(block: (NewChatTitle) -> T): T? = newChatTitleOrNull() ?.let(block) - -public inline fun ChatEvent.suggestedPostDeclinedOrNull(): SuggestedPostDeclined? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostDeclined - -public inline fun ChatEvent.suggestedPostDeclinedOrThrow(): SuggestedPostDeclined = this as dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostDeclined - -public inline fun ChatEvent.ifSuggestedPostDeclined(block: (SuggestedPostDeclined) -> T): T? = suggestedPostDeclinedOrNull() ?.let(block) - -public inline fun ChatEvent.suggestedPostApprovedOrNull(): SuggestedPostApproved? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostApproved - -public inline fun ChatEvent.suggestedPostApprovedOrThrow(): SuggestedPostApproved = this as dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostApproved - -public inline fun ChatEvent.ifSuggestedPostApproved(block: (SuggestedPostApproved) -> T): T? = suggestedPostApprovedOrNull() ?.let(block) - -public inline fun ChatEvent.suggestedPostRefundedOrNull(): SuggestedPostRefunded? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostRefunded - -public inline fun ChatEvent.suggestedPostRefundedOrThrow(): SuggestedPostRefunded = this as dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostRefunded - -public inline fun ChatEvent.ifSuggestedPostRefunded(block: (SuggestedPostRefunded) -> T): T? = suggestedPostRefundedOrNull() ?.let(block) +public inline fun ChatEvent.ifSuggestedPostApprovalFailed(block: (SuggestedPostApprovalFailed) -> T): T? = suggestedPostApprovalFailedOrNull() ?.let(block) public inline fun ChatEvent.suggestedPostPaidOrNull(): SuggestedPostPaid? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostPaid @@ -1390,23 +1788,29 @@ public inline fun ChatEvent.suggestedPostPaidOtherOrThrow(): SuggestedPostPaid.O public inline fun ChatEvent.ifSuggestedPostPaidOther(block: (SuggestedPostPaid.Other) -> T): T? = suggestedPostPaidOtherOrNull() ?.let(block) -public inline fun ChatEvent.suggestedPostApprovalFailedOrNull(): SuggestedPostApprovalFailed? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostApprovalFailed +public inline fun ChatEvent.suggestedPostDeclinedOrNull(): SuggestedPostDeclined? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostDeclined -public inline fun ChatEvent.suggestedPostApprovalFailedOrThrow(): SuggestedPostApprovalFailed = this as dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostApprovalFailed +public inline fun ChatEvent.suggestedPostDeclinedOrThrow(): SuggestedPostDeclined = this as dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostDeclined -public inline fun ChatEvent.ifSuggestedPostApprovalFailed(block: (SuggestedPostApprovalFailed) -> T): T? = suggestedPostApprovalFailedOrNull() ?.let(block) +public inline fun ChatEvent.ifSuggestedPostDeclined(block: (SuggestedPostDeclined) -> T): T? = suggestedPostDeclinedOrNull() ?.let(block) -public inline fun ChatEvent.deleteChatPhotoOrNull(): DeleteChatPhoto? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.DeleteChatPhoto +public inline fun ChatEvent.suggestedPostApprovedOrNull(): SuggestedPostApproved? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostApproved -public inline fun ChatEvent.deleteChatPhotoOrThrow(): DeleteChatPhoto = this as dev.inmo.tgbotapi.types.message.ChatEvents.DeleteChatPhoto +public inline fun ChatEvent.suggestedPostApprovedOrThrow(): SuggestedPostApproved = this as dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostApproved -public inline fun ChatEvent.ifDeleteChatPhoto(block: (DeleteChatPhoto) -> T): T? = deleteChatPhotoOrNull() ?.let(block) +public inline fun ChatEvent.ifSuggestedPostApproved(block: (SuggestedPostApproved) -> T): T? = suggestedPostApprovedOrNull() ?.let(block) -public inline fun ChatEvent.messageAutoDeleteTimerChangedOrNull(): MessageAutoDeleteTimerChanged? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.MessageAutoDeleteTimerChanged +public inline fun ChatEvent.suggestedPostRefundedOrNull(): SuggestedPostRefunded? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostRefunded -public inline fun ChatEvent.messageAutoDeleteTimerChangedOrThrow(): MessageAutoDeleteTimerChanged = this as dev.inmo.tgbotapi.types.message.ChatEvents.MessageAutoDeleteTimerChanged +public inline fun ChatEvent.suggestedPostRefundedOrThrow(): SuggestedPostRefunded = this as dev.inmo.tgbotapi.types.message.ChatEvents.suggested.SuggestedPostRefunded -public inline fun ChatEvent.ifMessageAutoDeleteTimerChanged(block: (MessageAutoDeleteTimerChanged) -> T): T? = messageAutoDeleteTimerChangedOrNull() ?.let(block) +public inline fun ChatEvent.ifSuggestedPostRefunded(block: (SuggestedPostRefunded) -> T): T? = suggestedPostRefundedOrNull() ?.let(block) + +public inline fun ChatEvent.userLoggedInOrNull(): UserLoggedIn? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.UserLoggedIn + +public inline fun ChatEvent.userLoggedInOrThrow(): UserLoggedIn = this as dev.inmo.tgbotapi.types.message.ChatEvents.UserLoggedIn + +public inline fun ChatEvent.ifUserLoggedIn(block: (UserLoggedIn) -> T): T? = userLoggedInOrNull() ?.let(block) public inline fun ChatEvent.channelChatCreatedOrNull(): ChannelChatCreated? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.ChannelChatCreated @@ -1414,65 +1818,137 @@ public inline fun ChatEvent.channelChatCreatedOrThrow(): ChannelChatCreated = th public inline fun ChatEvent.ifChannelChatCreated(block: (ChannelChatCreated) -> T): T? = channelChatCreatedOrNull() ?.let(block) -public inline fun ChatEvent.pollOptionDeletedOrNull(): PollOptionDeleted? = this as? dev.inmo.tgbotapi.types.polls.PollOptionDeleted +public inline fun ChatEvent.newChatPhotoOrNull(): NewChatPhoto? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.NewChatPhoto -public inline fun ChatEvent.pollOptionDeletedOrThrow(): PollOptionDeleted = this as dev.inmo.tgbotapi.types.polls.PollOptionDeleted +public inline fun ChatEvent.newChatPhotoOrThrow(): NewChatPhoto = this as dev.inmo.tgbotapi.types.message.ChatEvents.NewChatPhoto -public inline fun ChatEvent.ifPollOptionDeleted(block: (PollOptionDeleted) -> T): T? = pollOptionDeletedOrNull() ?.let(block) +public inline fun ChatEvent.ifNewChatPhoto(block: (NewChatPhoto) -> T): T? = newChatPhotoOrNull() ?.let(block) -public inline fun ChatEvent.pollOptionAddedOrNull(): PollOptionAdded? = this as? dev.inmo.tgbotapi.types.polls.PollOptionAdded +public inline fun ChatEvent.webAppDataOrNull(): WebAppData? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.WebAppData -public inline fun ChatEvent.pollOptionAddedOrThrow(): PollOptionAdded = this as dev.inmo.tgbotapi.types.polls.PollOptionAdded +public inline fun ChatEvent.webAppDataOrThrow(): WebAppData = this as dev.inmo.tgbotapi.types.message.ChatEvents.WebAppData -public inline fun ChatEvent.ifPollOptionAdded(block: (PollOptionAdded) -> T): T? = pollOptionAddedOrNull() ?.let(block) +public inline fun ChatEvent.ifWebAppData(block: (WebAppData) -> T): T? = webAppDataOrNull() ?.let(block) -public inline fun ChatEvent.giveawayCreatedOrNull(): GiveawayCreated? = this as? dev.inmo.tgbotapi.types.giveaway.GiveawayCreated +public inline fun ChatEvent.videoChatEventOrNull(): VideoChatEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.VideoChatEvent -public inline fun ChatEvent.giveawayCreatedOrThrow(): GiveawayCreated = this as dev.inmo.tgbotapi.types.giveaway.GiveawayCreated +public inline fun ChatEvent.videoChatEventOrThrow(): VideoChatEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.VideoChatEvent -public inline fun ChatEvent.ifGiveawayCreated(block: (GiveawayCreated) -> T): T? = giveawayCreatedOrNull() ?.let(block) +public inline fun ChatEvent.ifVideoChatEvent(block: (VideoChatEvent) -> T): T? = videoChatEventOrNull() ?.let(block) -public inline fun ChatEvent.giveawayCreatedStarsOrNull(): GiveawayCreated.Stars? = this as? dev.inmo.tgbotapi.types.giveaway.GiveawayCreated.Stars +public inline fun ChatEvent.groupEventOrNull(): GroupEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.GroupEvent -public inline fun ChatEvent.giveawayCreatedStarsOrThrow(): GiveawayCreated.Stars = this as dev.inmo.tgbotapi.types.giveaway.GiveawayCreated.Stars +public inline fun ChatEvent.groupEventOrThrow(): GroupEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.GroupEvent -public inline fun ChatEvent.ifGiveawayCreatedStars(block: (GiveawayCreated.Stars) -> T): T? = giveawayCreatedStarsOrNull() ?.let(block) +public inline fun ChatEvent.ifGroupEvent(block: (GroupEvent) -> T): T? = groupEventOrNull() ?.let(block) -public inline fun ChatEvent.giveawayCreatedCompanionOrNull(): GiveawayCreated.Companion? = this as? dev.inmo.tgbotapi.types.giveaway.GiveawayCreated.Companion +public inline fun ChatEvent.forumEventOrNull(): ForumEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ForumEvent -public inline fun ChatEvent.giveawayCreatedCompanionOrThrow(): GiveawayCreated.Companion = this as dev.inmo.tgbotapi.types.giveaway.GiveawayCreated.Companion +public inline fun ChatEvent.forumEventOrThrow(): ForumEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ForumEvent -public inline fun ChatEvent.ifGiveawayCreatedCompanion(block: (GiveawayCreated.Companion) -> T): T? = giveawayCreatedCompanionOrNull() ?.let(block) +public inline fun ChatEvent.ifForumEvent(block: (ForumEvent) -> T): T? = forumEventOrNull() ?.let(block) -public inline fun ChatEvent.giveawayPrivateResultsOrNull(): GiveawayPrivateResults? = this as? dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults +public inline fun ChatEvent.privateEventOrNull(): PrivateEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.PrivateEvent -public inline fun ChatEvent.giveawayPrivateResultsOrThrow(): GiveawayPrivateResults = this as dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults +public inline fun ChatEvent.privateEventOrThrow(): PrivateEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.PrivateEvent -public inline fun ChatEvent.ifGiveawayPrivateResults(block: (GiveawayPrivateResults) -> T): T? = giveawayPrivateResultsOrNull() ?.let(block) +public inline fun ChatEvent.ifPrivateEvent(block: (PrivateEvent) -> T): T? = privateEventOrNull() ?.let(block) -public inline fun ChatEvent.managedBotCreatedOrNull(): ManagedBotCreated? = this as? dev.inmo.tgbotapi.types.managed_bots.ManagedBotCreated +public inline fun ChatEvent.privateForumEventOrNull(): PrivateForumEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.PrivateForumEvent -public inline fun ChatEvent.managedBotCreatedOrThrow(): ManagedBotCreated = this as dev.inmo.tgbotapi.types.managed_bots.ManagedBotCreated +public inline fun ChatEvent.privateForumEventOrThrow(): PrivateForumEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.PrivateForumEvent -public inline fun ChatEvent.ifManagedBotCreated(block: (ManagedBotCreated) -> T): T? = managedBotCreatedOrNull() ?.let(block) +public inline fun ChatEvent.ifPrivateForumEvent(block: (PrivateForumEvent) -> T): T? = privateForumEventOrNull() ?.let(block) -public inline fun ChatEvent.usersSharedOrNull(): UsersShared? = this as? dev.inmo.tgbotapi.types.request.UsersShared +public inline fun ChatEvent.channelEventOrNull(): ChannelEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ChannelEvent -public inline fun ChatEvent.usersSharedOrThrow(): UsersShared = this as dev.inmo.tgbotapi.types.request.UsersShared +public inline fun ChatEvent.channelEventOrThrow(): ChannelEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ChannelEvent -public inline fun ChatEvent.ifUsersShared(block: (UsersShared) -> T): T? = usersSharedOrNull() ?.let(block) +public inline fun ChatEvent.ifChannelEvent(block: (ChannelEvent) -> T): T? = channelEventOrNull() ?.let(block) -public inline fun ChatEvent.chatSharedOrNull(): ChatShared? = this as? dev.inmo.tgbotapi.types.request.ChatShared +public inline fun ChatEvent.publicChatEventOrNull(): PublicChatEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.PublicChatEvent -public inline fun ChatEvent.chatSharedOrThrow(): ChatShared = this as dev.inmo.tgbotapi.types.request.ChatShared +public inline fun ChatEvent.publicChatEventOrThrow(): PublicChatEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.PublicChatEvent -public inline fun ChatEvent.ifChatShared(block: (ChatShared) -> T): T? = chatSharedOrNull() ?.let(block) +public inline fun ChatEvent.ifPublicChatEvent(block: (PublicChatEvent) -> T): T? = publicChatEventOrNull() ?.let(block) -public inline fun ChatEvent.chatSharedRequestOrNull(): ChatSharedRequest? = this as? dev.inmo.tgbotapi.types.request.ChatSharedRequest +public inline fun ChatEvent.commonEventOrNull(): CommonEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.CommonEvent -public inline fun ChatEvent.chatSharedRequestOrThrow(): ChatSharedRequest = this as dev.inmo.tgbotapi.types.request.ChatSharedRequest +public inline fun ChatEvent.commonEventOrThrow(): CommonEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.CommonEvent -public inline fun ChatEvent.ifChatSharedRequest(block: (ChatSharedRequest) -> T): T? = chatSharedRequestOrNull() ?.let(block) +public inline fun ChatEvent.ifCommonEvent(block: (CommonEvent) -> T): T? = commonEventOrNull() ?.let(block) + +public inline fun ChatEvent.supergroupEventOrNull(): SupergroupEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.SupergroupEvent + +public inline fun ChatEvent.supergroupEventOrThrow(): SupergroupEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.SupergroupEvent + +public inline fun ChatEvent.ifSupergroupEvent(block: (SupergroupEvent) -> T): T? = supergroupEventOrNull() ?.let(block) + +public inline fun ChatEvent.channelDirectMessagesEventOrNull(): ChannelDirectMessagesEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ChannelDirectMessagesEvent + +public inline fun ChatEvent.channelDirectMessagesEventOrThrow(): ChannelDirectMessagesEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ChannelDirectMessagesEvent + +public inline fun ChatEvent.ifChannelDirectMessagesEvent(block: (ChannelDirectMessagesEvent) -> T): T? = channelDirectMessagesEventOrNull() ?.let(block) + +public inline fun ChatEvent.proximityAlertTriggeredOrNull(): ProximityAlertTriggered? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.ProximityAlertTriggered + +public inline fun ChatEvent.proximityAlertTriggeredOrThrow(): ProximityAlertTriggered = this as dev.inmo.tgbotapi.types.message.ChatEvents.ProximityAlertTriggered + +public inline fun ChatEvent.ifProximityAlertTriggered(block: (ProximityAlertTriggered) -> T): T? = proximityAlertTriggeredOrNull() ?.let(block) + +public inline fun ChatEvent.newChatTitleOrNull(): NewChatTitle? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.NewChatTitle + +public inline fun ChatEvent.newChatTitleOrThrow(): NewChatTitle = this as dev.inmo.tgbotapi.types.message.ChatEvents.NewChatTitle + +public inline fun ChatEvent.ifNewChatTitle(block: (NewChatTitle) -> T): T? = newChatTitleOrNull() ?.let(block) + +public inline fun ChatEvent.chatOwnerChangedOrNull(): ChatOwnerChanged? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.ChatOwnerChanged + +public inline fun ChatEvent.chatOwnerChangedOrThrow(): ChatOwnerChanged = this as dev.inmo.tgbotapi.types.message.ChatEvents.ChatOwnerChanged + +public inline fun ChatEvent.ifChatOwnerChanged(block: (ChatOwnerChanged) -> T): T? = chatOwnerChangedOrNull() ?.let(block) + +public inline fun ChatEvent.deleteChatPhotoOrNull(): DeleteChatPhoto? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.DeleteChatPhoto + +public inline fun ChatEvent.deleteChatPhotoOrThrow(): DeleteChatPhoto = this as dev.inmo.tgbotapi.types.message.ChatEvents.DeleteChatPhoto + +public inline fun ChatEvent.ifDeleteChatPhoto(block: (DeleteChatPhoto) -> T): T? = deleteChatPhotoOrNull() ?.let(block) + +public inline fun ChatEvent.pinnedMessageOrNull(): PinnedMessage? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.PinnedMessage + +public inline fun ChatEvent.pinnedMessageOrThrow(): PinnedMessage = this as dev.inmo.tgbotapi.types.message.ChatEvents.PinnedMessage + +public inline fun ChatEvent.ifPinnedMessage(block: (PinnedMessage) -> T): T? = pinnedMessageOrNull() ?.let(block) + +public inline fun ChatEvent.directMessagesConfigurationChangedOrNull(): DirectMessagesConfigurationChanged? = this as? dev.inmo.tgbotapi.types.DirectMessagesConfigurationChanged + +public inline fun ChatEvent.directMessagesConfigurationChangedOrThrow(): DirectMessagesConfigurationChanged = this as dev.inmo.tgbotapi.types.DirectMessagesConfigurationChanged + +public inline fun ChatEvent.ifDirectMessagesConfigurationChanged(block: (DirectMessagesConfigurationChanged) -> T): T? = directMessagesConfigurationChangedOrNull() ?.let(block) + +public inline fun ChatEvent.directMessagesConfigurationChangedDisabledOrNull(): DirectMessagesConfigurationChanged.Disabled? = this as? dev.inmo.tgbotapi.types.DirectMessagesConfigurationChanged.Disabled + +public inline fun ChatEvent.directMessagesConfigurationChangedDisabledOrThrow(): DirectMessagesConfigurationChanged.Disabled = this as dev.inmo.tgbotapi.types.DirectMessagesConfigurationChanged.Disabled + +public inline fun ChatEvent.ifDirectMessagesConfigurationChangedDisabled(block: (DirectMessagesConfigurationChanged.Disabled) -> T): T? = directMessagesConfigurationChangedDisabledOrNull() ?.let(block) + +public inline fun ChatEvent.directMessagesConfigurationChangedFreeOrNull(): DirectMessagesConfigurationChanged.Free? = this as? dev.inmo.tgbotapi.types.DirectMessagesConfigurationChanged.Free + +public inline fun ChatEvent.directMessagesConfigurationChangedFreeOrThrow(): DirectMessagesConfigurationChanged.Free = this as dev.inmo.tgbotapi.types.DirectMessagesConfigurationChanged.Free + +public inline fun ChatEvent.ifDirectMessagesConfigurationChangedFree(block: (DirectMessagesConfigurationChanged.Free) -> T): T? = directMessagesConfigurationChangedFreeOrNull() ?.let(block) + +public inline fun ChatEvent.directMessagesConfigurationChangedPaidOrNull(): DirectMessagesConfigurationChanged.Paid? = this as? dev.inmo.tgbotapi.types.DirectMessagesConfigurationChanged.Paid + +public inline fun ChatEvent.directMessagesConfigurationChangedPaidOrThrow(): DirectMessagesConfigurationChanged.Paid = this as dev.inmo.tgbotapi.types.DirectMessagesConfigurationChanged.Paid + +public inline fun ChatEvent.ifDirectMessagesConfigurationChangedPaid(block: (DirectMessagesConfigurationChanged.Paid) -> T): T? = directMessagesConfigurationChangedPaidOrNull() ?.let(block) + +public inline fun ChatEvent.paidMessagePriceChangedOrNull(): PaidMessagePriceChanged? = this as? dev.inmo.tgbotapi.types.PaidMessagePriceChanged + +public inline fun ChatEvent.paidMessagePriceChangedOrThrow(): PaidMessagePriceChanged = this as dev.inmo.tgbotapi.types.PaidMessagePriceChanged + +public inline fun ChatEvent.ifPaidMessagePriceChanged(block: (PaidMessagePriceChanged) -> T): T? = paidMessagePriceChangedOrNull() ?.let(block) public inline fun ChatEvent.giftSentOrReceivedEventOrNull(): GiftSentOrReceivedEvent? = this as? dev.inmo.tgbotapi.types.gifts.GiftSentOrReceivedEvent @@ -1522,35 +1998,11 @@ public inline fun ChatEvent.giftSentOrReceivedEventUniqueGiftReceivedInBusinessA public inline fun ChatEvent.ifGiftSentOrReceivedEventUniqueGiftReceivedInBusinessAccount(block: (GiftSentOrReceivedEvent.UniqueGift.ReceivedInBusinessAccount) -> T): T? = giftSentOrReceivedEventUniqueGiftReceivedInBusinessAccountOrNull() ?.let(block) -public inline fun ChatEvent.chatBackgroundOrNull(): ChatBackground? = this as? dev.inmo.tgbotapi.types.chat.ChatBackground +public inline fun ChatEvent.checklistTasksAddedOrNull(): ChecklistTasksAdded? = this as? dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded -public inline fun ChatEvent.chatBackgroundOrThrow(): ChatBackground = this as dev.inmo.tgbotapi.types.chat.ChatBackground +public inline fun ChatEvent.checklistTasksAddedOrThrow(): ChecklistTasksAdded = this as dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded -public inline fun ChatEvent.ifChatBackground(block: (ChatBackground) -> T): T? = chatBackgroundOrNull() ?.let(block) - -public inline fun ChatEvent.directMessagesConfigurationChangedOrNull(): DirectMessagesConfigurationChanged? = this as? dev.inmo.tgbotapi.types.DirectMessagesConfigurationChanged - -public inline fun ChatEvent.directMessagesConfigurationChangedOrThrow(): DirectMessagesConfigurationChanged = this as dev.inmo.tgbotapi.types.DirectMessagesConfigurationChanged - -public inline fun ChatEvent.ifDirectMessagesConfigurationChanged(block: (DirectMessagesConfigurationChanged) -> T): T? = directMessagesConfigurationChangedOrNull() ?.let(block) - -public inline fun ChatEvent.directMessagesConfigurationChangedDisabledOrNull(): DirectMessagesConfigurationChanged.Disabled? = this as? dev.inmo.tgbotapi.types.DirectMessagesConfigurationChanged.Disabled - -public inline fun ChatEvent.directMessagesConfigurationChangedDisabledOrThrow(): DirectMessagesConfigurationChanged.Disabled = this as dev.inmo.tgbotapi.types.DirectMessagesConfigurationChanged.Disabled - -public inline fun ChatEvent.ifDirectMessagesConfigurationChangedDisabled(block: (DirectMessagesConfigurationChanged.Disabled) -> T): T? = directMessagesConfigurationChangedDisabledOrNull() ?.let(block) - -public inline fun ChatEvent.directMessagesConfigurationChangedFreeOrNull(): DirectMessagesConfigurationChanged.Free? = this as? dev.inmo.tgbotapi.types.DirectMessagesConfigurationChanged.Free - -public inline fun ChatEvent.directMessagesConfigurationChangedFreeOrThrow(): DirectMessagesConfigurationChanged.Free = this as dev.inmo.tgbotapi.types.DirectMessagesConfigurationChanged.Free - -public inline fun ChatEvent.ifDirectMessagesConfigurationChangedFree(block: (DirectMessagesConfigurationChanged.Free) -> T): T? = directMessagesConfigurationChangedFreeOrNull() ?.let(block) - -public inline fun ChatEvent.directMessagesConfigurationChangedPaidOrNull(): DirectMessagesConfigurationChanged.Paid? = this as? dev.inmo.tgbotapi.types.DirectMessagesConfigurationChanged.Paid - -public inline fun ChatEvent.directMessagesConfigurationChangedPaidOrThrow(): DirectMessagesConfigurationChanged.Paid = this as dev.inmo.tgbotapi.types.DirectMessagesConfigurationChanged.Paid - -public inline fun ChatEvent.ifDirectMessagesConfigurationChangedPaid(block: (DirectMessagesConfigurationChanged.Paid) -> T): T? = directMessagesConfigurationChangedPaidOrNull() ?.let(block) +public inline fun ChatEvent.ifChecklistTasksAdded(block: (ChecklistTasksAdded) -> T): T? = checklistTasksAddedOrNull() ?.let(block) public inline fun ChatEvent.checklistTasksDoneOrNull(): ChecklistTasksDone? = this as? dev.inmo.tgbotapi.types.checklists.ChecklistTasksDone @@ -1558,17 +2010,155 @@ public inline fun ChatEvent.checklistTasksDoneOrThrow(): ChecklistTasksDone = th public inline fun ChatEvent.ifChecklistTasksDone(block: (ChecklistTasksDone) -> T): T? = checklistTasksDoneOrNull() ?.let(block) -public inline fun ChatEvent.checklistTasksAddedOrNull(): ChecklistTasksAdded? = this as? dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded +public inline fun ChatEvent.managedBotCreatedOrNull(): ManagedBotCreated? = this as? dev.inmo.tgbotapi.types.managed_bots.ManagedBotCreated -public inline fun ChatEvent.checklistTasksAddedOrThrow(): ChecklistTasksAdded = this as dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded +public inline fun ChatEvent.managedBotCreatedOrThrow(): ManagedBotCreated = this as dev.inmo.tgbotapi.types.managed_bots.ManagedBotCreated -public inline fun ChatEvent.ifChecklistTasksAdded(block: (ChecklistTasksAdded) -> T): T? = checklistTasksAddedOrNull() ?.let(block) +public inline fun ChatEvent.ifManagedBotCreated(block: (ManagedBotCreated) -> T): T? = managedBotCreatedOrNull() ?.let(block) -public inline fun ChatEvent.paidMessagePriceChangedOrNull(): PaidMessagePriceChanged? = this as? dev.inmo.tgbotapi.types.PaidMessagePriceChanged +public inline fun ChatEvent.chatBackgroundOrNull(): ChatBackground? = this as? dev.inmo.tgbotapi.types.chat.ChatBackground -public inline fun ChatEvent.paidMessagePriceChangedOrThrow(): PaidMessagePriceChanged = this as dev.inmo.tgbotapi.types.PaidMessagePriceChanged +public inline fun ChatEvent.chatBackgroundOrThrow(): ChatBackground = this as dev.inmo.tgbotapi.types.chat.ChatBackground -public inline fun ChatEvent.ifPaidMessagePriceChanged(block: (PaidMessagePriceChanged) -> T): T? = paidMessagePriceChangedOrNull() ?.let(block) +public inline fun ChatEvent.ifChatBackground(block: (ChatBackground) -> T): T? = chatBackgroundOrNull() ?.let(block) + +public inline fun TextSource.cashTagTextSourceOrNull(): CashTagTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.CashTagTextSource + +public inline fun TextSource.cashTagTextSourceOrThrow(): CashTagTextSource = this as dev.inmo.tgbotapi.types.message.textsources.CashTagTextSource + +public inline fun TextSource.ifCashTagTextSource(block: (CashTagTextSource) -> T): T? = cashTagTextSourceOrNull() ?.let(block) + +public inline fun TextSource.expandableBlockquoteTextSourceOrNull(): ExpandableBlockquoteTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.ExpandableBlockquoteTextSource + +public inline fun TextSource.expandableBlockquoteTextSourceOrThrow(): ExpandableBlockquoteTextSource = this as dev.inmo.tgbotapi.types.message.textsources.ExpandableBlockquoteTextSource + +public inline fun TextSource.ifExpandableBlockquoteTextSource(block: (ExpandableBlockquoteTextSource) -> T): T? = expandableBlockquoteTextSourceOrNull() ?.let(block) + +public inline fun TextSource.strikethroughTextSourceOrNull(): StrikethroughTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.StrikethroughTextSource + +public inline fun TextSource.strikethroughTextSourceOrThrow(): StrikethroughTextSource = this as dev.inmo.tgbotapi.types.message.textsources.StrikethroughTextSource + +public inline fun TextSource.ifStrikethroughTextSource(block: (StrikethroughTextSource) -> T): T? = strikethroughTextSourceOrNull() ?.let(block) + +public inline fun TextSource.dateTimeTextSourceOrNull(): DateTimeTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.DateTimeTextSource + +public inline fun TextSource.dateTimeTextSourceOrThrow(): DateTimeTextSource = this as dev.inmo.tgbotapi.types.message.textsources.DateTimeTextSource + +public inline fun TextSource.ifDateTimeTextSource(block: (DateTimeTextSource) -> T): T? = dateTimeTextSourceOrNull() ?.let(block) + +public inline fun TextSource.uRLTextSourceOrNull(): URLTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.URLTextSource + +public inline fun TextSource.uRLTextSourceOrThrow(): URLTextSource = this as dev.inmo.tgbotapi.types.message.textsources.URLTextSource + +public inline fun TextSource.ifURLTextSource(block: (URLTextSource) -> T): T? = uRLTextSourceOrNull() ?.let(block) + +public inline fun TextSource.blockquoteTextSourceOrNull(): BlockquoteTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.BlockquoteTextSource + +public inline fun TextSource.blockquoteTextSourceOrThrow(): BlockquoteTextSource = this as dev.inmo.tgbotapi.types.message.textsources.BlockquoteTextSource + +public inline fun TextSource.ifBlockquoteTextSource(block: (BlockquoteTextSource) -> T): T? = blockquoteTextSourceOrNull() ?.let(block) + +public inline fun TextSource.spoilerTextSourceOrNull(): SpoilerTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.SpoilerTextSource + +public inline fun TextSource.spoilerTextSourceOrThrow(): SpoilerTextSource = this as dev.inmo.tgbotapi.types.message.textsources.SpoilerTextSource + +public inline fun TextSource.ifSpoilerTextSource(block: (SpoilerTextSource) -> T): T? = spoilerTextSourceOrNull() ?.let(block) + +public inline fun TextSource.regularTextSourceOrNull(): RegularTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.RegularTextSource + +public inline fun TextSource.regularTextSourceOrThrow(): RegularTextSource = this as dev.inmo.tgbotapi.types.message.textsources.RegularTextSource + +public inline fun TextSource.ifRegularTextSource(block: (RegularTextSource) -> T): T? = regularTextSourceOrNull() ?.let(block) + +public inline fun TextSource.botCommandTextSourceOrNull(): BotCommandTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.BotCommandTextSource + +public inline fun TextSource.botCommandTextSourceOrThrow(): BotCommandTextSource = this as dev.inmo.tgbotapi.types.message.textsources.BotCommandTextSource + +public inline fun TextSource.ifBotCommandTextSource(block: (BotCommandTextSource) -> T): T? = botCommandTextSourceOrNull() ?.let(block) + +public inline fun TextSource.underlineTextSourceOrNull(): UnderlineTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.UnderlineTextSource + +public inline fun TextSource.underlineTextSourceOrThrow(): UnderlineTextSource = this as dev.inmo.tgbotapi.types.message.textsources.UnderlineTextSource + +public inline fun TextSource.ifUnderlineTextSource(block: (UnderlineTextSource) -> T): T? = underlineTextSourceOrNull() ?.let(block) + +public inline fun TextSource.multilevelTextSourceOrNull(): MultilevelTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.MultilevelTextSource + +public inline fun TextSource.multilevelTextSourceOrThrow(): MultilevelTextSource = this as dev.inmo.tgbotapi.types.message.textsources.MultilevelTextSource + +public inline fun TextSource.ifMultilevelTextSource(block: (MultilevelTextSource) -> T): T? = multilevelTextSourceOrNull() ?.let(block) + +public inline fun TextSource.customEmojiTextSourceOrNull(): CustomEmojiTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.CustomEmojiTextSource + +public inline fun TextSource.customEmojiTextSourceOrThrow(): CustomEmojiTextSource = this as dev.inmo.tgbotapi.types.message.textsources.CustomEmojiTextSource + +public inline fun TextSource.ifCustomEmojiTextSource(block: (CustomEmojiTextSource) -> T): T? = customEmojiTextSourceOrNull() ?.let(block) + +public inline fun TextSource.phoneNumberTextSourceOrNull(): PhoneNumberTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.PhoneNumberTextSource + +public inline fun TextSource.phoneNumberTextSourceOrThrow(): PhoneNumberTextSource = this as dev.inmo.tgbotapi.types.message.textsources.PhoneNumberTextSource + +public inline fun TextSource.ifPhoneNumberTextSource(block: (PhoneNumberTextSource) -> T): T? = phoneNumberTextSourceOrNull() ?.let(block) + +public inline fun TextSource.preTextSourceOrNull(): PreTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.PreTextSource + +public inline fun TextSource.preTextSourceOrThrow(): PreTextSource = this as dev.inmo.tgbotapi.types.message.textsources.PreTextSource + +public inline fun TextSource.ifPreTextSource(block: (PreTextSource) -> T): T? = preTextSourceOrNull() ?.let(block) + +public inline fun TextSource.mentionTextSourceOrNull(): MentionTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.MentionTextSource + +public inline fun TextSource.mentionTextSourceOrThrow(): MentionTextSource = this as dev.inmo.tgbotapi.types.message.textsources.MentionTextSource + +public inline fun TextSource.ifMentionTextSource(block: (MentionTextSource) -> T): T? = mentionTextSourceOrNull() ?.let(block) + +public inline fun TextSource.eMailTextSourceOrNull(): EMailTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.EMailTextSource + +public inline fun TextSource.eMailTextSourceOrThrow(): EMailTextSource = this as dev.inmo.tgbotapi.types.message.textsources.EMailTextSource + +public inline fun TextSource.ifEMailTextSource(block: (EMailTextSource) -> T): T? = eMailTextSourceOrNull() ?.let(block) + +public inline fun TextSource.textMentionTextSourceOrNull(): TextMentionTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.TextMentionTextSource + +public inline fun TextSource.textMentionTextSourceOrThrow(): TextMentionTextSource = this as dev.inmo.tgbotapi.types.message.textsources.TextMentionTextSource + +public inline fun TextSource.ifTextMentionTextSource(block: (TextMentionTextSource) -> T): T? = textMentionTextSourceOrNull() ?.let(block) + +public inline fun TextSource.codeTextSourceOrNull(): CodeTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.CodeTextSource + +public inline fun TextSource.codeTextSourceOrThrow(): CodeTextSource = this as dev.inmo.tgbotapi.types.message.textsources.CodeTextSource + +public inline fun TextSource.ifCodeTextSource(block: (CodeTextSource) -> T): T? = codeTextSourceOrNull() ?.let(block) + +public inline fun TextSource.textLinkTextSourceOrNull(): TextLinkTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.TextLinkTextSource + +public inline fun TextSource.textLinkTextSourceOrThrow(): TextLinkTextSource = this as dev.inmo.tgbotapi.types.message.textsources.TextLinkTextSource + +public inline fun TextSource.ifTextLinkTextSource(block: (TextLinkTextSource) -> T): T? = textLinkTextSourceOrNull() ?.let(block) + +public inline fun TextSource.boldTextSourceOrNull(): BoldTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.BoldTextSource + +public inline fun TextSource.boldTextSourceOrThrow(): BoldTextSource = this as dev.inmo.tgbotapi.types.message.textsources.BoldTextSource + +public inline fun TextSource.ifBoldTextSource(block: (BoldTextSource) -> T): T? = boldTextSourceOrNull() ?.let(block) + +public inline fun TextSource.italicTextSourceOrNull(): ItalicTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.ItalicTextSource + +public inline fun TextSource.italicTextSourceOrThrow(): ItalicTextSource = this as dev.inmo.tgbotapi.types.message.textsources.ItalicTextSource + +public inline fun TextSource.ifItalicTextSource(block: (ItalicTextSource) -> T): T? = italicTextSourceOrNull() ?.let(block) + +public inline fun TextSource.hashTagTextSourceOrNull(): HashTagTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.HashTagTextSource + +public inline fun TextSource.hashTagTextSourceOrThrow(): HashTagTextSource = this as dev.inmo.tgbotapi.types.message.textsources.HashTagTextSource + +public inline fun TextSource.ifHashTagTextSource(block: (HashTagTextSource) -> T): T? = hashTagTextSourceOrNull() ?.let(block) + +public inline fun Message.privateEventMessageOrNull(): PrivateEventMessage? = this as? dev.inmo.tgbotapi.types.message.PrivateEventMessage + +public inline fun Message.privateEventMessageOrThrow(): PrivateEventMessage = this as dev.inmo.tgbotapi.types.message.PrivateEventMessage + +public inline fun Message.ifPrivateEventMessage(block: (PrivateEventMessage) -> T): T? = privateEventMessageOrNull() ?.let(block) public inline fun Message.channelEventMessageOrNull(): ChannelEventMessage? = this as? dev.inmo.tgbotapi.types.message.ChannelEventMessage @@ -1576,53 +2166,59 @@ public inline fun Message.channelEventMessageOrThrow(): ChannelEventMessage Message.ifChannelEventMessage(block: (ChannelEventMessage) -> T): T? = channelEventMessageOrNull() ?.let(block) -public inline fun Message.privateForumEventMessageOrNull(): PrivateForumEventMessage? = this as? dev.inmo.tgbotapi.types.message.PrivateForumEventMessage +public inline fun Message.commonChannelDirectMessagesEventMessageOrNull(): CommonChannelDirectMessagesEventMessage? = this as? dev.inmo.tgbotapi.types.message.CommonChannelDirectMessagesEventMessage -public inline fun Message.privateForumEventMessageOrThrow(): PrivateForumEventMessage = this as dev.inmo.tgbotapi.types.message.PrivateForumEventMessage +public inline fun Message.commonChannelDirectMessagesEventMessageOrThrow(): CommonChannelDirectMessagesEventMessage = this as dev.inmo.tgbotapi.types.message.CommonChannelDirectMessagesEventMessage -public inline fun Message.ifPrivateForumEventMessage(block: (PrivateForumEventMessage) -> T): T? = privateForumEventMessageOrNull() ?.let(block) +public inline fun Message.ifCommonChannelDirectMessagesEventMessage(block: (CommonChannelDirectMessagesEventMessage) -> T): T? = commonChannelDirectMessagesEventMessageOrNull() ?.let(block) -public inline fun Message.commonSupergroupEventMessageOrNull(): CommonSupergroupEventMessage? = this as? dev.inmo.tgbotapi.types.message.CommonSupergroupEventMessage +public inline fun Message.passportMessageOrNull(): PassportMessage? = this as? dev.inmo.tgbotapi.types.message.PassportMessage -public inline fun Message.commonSupergroupEventMessageOrThrow(): CommonSupergroupEventMessage = this as dev.inmo.tgbotapi.types.message.CommonSupergroupEventMessage +public inline fun Message.passportMessageOrThrow(): PassportMessage = this as dev.inmo.tgbotapi.types.message.PassportMessage -public inline fun Message.ifCommonSupergroupEventMessage(block: (CommonSupergroupEventMessage) -> T): T? = commonSupergroupEventMessageOrNull() ?.let(block) +public inline fun Message.ifPassportMessage(block: (PassportMessage) -> T): T? = passportMessageOrNull() ?.let(block) -public inline fun Message.businessContentMessageOrNull(): BusinessContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.BusinessContentMessage +public inline fun Message.chatEventMessageOrNull(): ChatEventMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.ChatEventMessage -public inline fun Message.businessContentMessageOrThrow(): BusinessContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.BusinessContentMessage +public inline fun Message.chatEventMessageOrThrow(): ChatEventMessage = this as dev.inmo.tgbotapi.types.message.abstracts.ChatEventMessage -public inline fun Message.ifBusinessContentMessage(block: (BusinessContentMessage) -> T): T? = businessContentMessageOrNull() ?.let(block) +public inline fun Message.ifChatEventMessage(block: (ChatEventMessage) -> T): T? = chatEventMessageOrNull() ?.let(block) -public inline fun Message.commonContentMessageOrNull(): CommonContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.CommonContentMessage +public inline fun Message.channelContentMessageOrNull(): ChannelContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.ChannelContentMessage -public inline fun Message.commonContentMessageOrThrow(): CommonContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.CommonContentMessage +public inline fun Message.channelContentMessageOrThrow(): ChannelContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.ChannelContentMessage -public inline fun Message.ifCommonContentMessage(block: (CommonContentMessage) -> T): T? = commonContentMessageOrNull() ?.let(block) +public inline fun Message.ifChannelContentMessage(block: (ChannelContentMessage) -> T): T? = channelContentMessageOrNull() ?.let(block) -public inline fun Message.optionallyFromUserMessageOrNull(): OptionallyFromUserMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.OptionallyFromUserMessage +public inline fun Message.chatContentMessageOrNull(): ChatContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage -public inline fun Message.optionallyFromUserMessageOrThrow(): OptionallyFromUserMessage = this as dev.inmo.tgbotapi.types.message.abstracts.OptionallyFromUserMessage +public inline fun Message.chatContentMessageOrThrow(): ChatContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage -public inline fun Message.ifOptionallyFromUserMessage(block: (OptionallyFromUserMessage) -> T): T? = optionallyFromUserMessageOrNull() ?.let(block) +public inline fun Message.ifChatContentMessage(block: (ChatContentMessage) -> T): T? = chatContentMessageOrNull() ?.let(block) -public inline fun Message.fromUserMessageOrNull(): FromUserMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.FromUserMessage +public inline fun Message.possiblyTopicMessageOrNull(): PossiblyTopicMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PossiblyTopicMessage -public inline fun Message.fromUserMessageOrThrow(): FromUserMessage = this as dev.inmo.tgbotapi.types.message.abstracts.FromUserMessage +public inline fun Message.possiblyTopicMessageOrThrow(): PossiblyTopicMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PossiblyTopicMessage -public inline fun Message.ifFromUserMessage(block: (FromUserMessage) -> T): T? = fromUserMessageOrNull() ?.let(block) +public inline fun Message.ifPossiblyTopicMessage(block: (PossiblyTopicMessage) -> T): T? = possiblyTopicMessageOrNull() ?.let(block) -public inline fun Message.fromUserChatMessageOrNull(): FromUserChatMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.FromUserChatMessage +public inline fun Message.channelDirectMessagesEventMessageOrNull(): ChannelDirectMessagesEventMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.ChannelDirectMessagesEventMessage -public inline fun Message.fromUserChatMessageOrThrow(): FromUserChatMessage = this as dev.inmo.tgbotapi.types.message.abstracts.FromUserChatMessage +public inline fun Message.channelDirectMessagesEventMessageOrThrow(): ChannelDirectMessagesEventMessage = this as dev.inmo.tgbotapi.types.message.abstracts.ChannelDirectMessagesEventMessage -public inline fun Message.ifFromUserChatMessage(block: (FromUserChatMessage) -> T): T? = fromUserChatMessageOrNull() ?.let(block) +public inline fun Message.ifChannelDirectMessagesEventMessage(block: (ChannelDirectMessagesEventMessage) -> T): T? = channelDirectMessagesEventMessageOrNull() ?.let(block) -public inline fun Message.requestGuestContentMessageOrNull(): RequestGuestContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.RequestGuestContentMessage +public inline fun Message.privateContentMessageOrNull(): PrivateContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PrivateContentMessage -public inline fun Message.requestGuestContentMessageOrThrow(): RequestGuestContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.RequestGuestContentMessage +public inline fun Message.privateContentMessageOrThrow(): PrivateContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PrivateContentMessage -public inline fun Message.ifRequestGuestContentMessage(block: (RequestGuestContentMessage) -> T): T? = requestGuestContentMessageOrNull() ?.let(block) +public inline fun Message.ifPrivateContentMessage(block: (PrivateContentMessage) -> T): T? = privateContentMessageOrNull() ?.let(block) + +public inline fun Message.possiblyPaidMessageOrNull(): PossiblyPaidMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PossiblyPaidMessage + +public inline fun Message.possiblyPaidMessageOrThrow(): PossiblyPaidMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PossiblyPaidMessage + +public inline fun Message.ifPossiblyPaidMessage(block: (PossiblyPaidMessage) -> T): T? = possiblyPaidMessageOrNull() ?.let(block) public inline fun Message.accessibleMessageOrNull(): AccessibleMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage @@ -1654,71 +2250,47 @@ public inline fun Message.unknownMessageTypeOrThrow(): UnknownMessageType = this public inline fun Message.ifUnknownMessageType(block: (UnknownMessageType) -> T): T? = unknownMessageTypeOrNull() ?.let(block) -public inline fun Message.supergroupEventMessageOrNull(): SupergroupEventMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.SupergroupEventMessage - -public inline fun Message.supergroupEventMessageOrThrow(): SupergroupEventMessage = this as dev.inmo.tgbotapi.types.message.abstracts.SupergroupEventMessage - -public inline fun Message.ifSupergroupEventMessage(block: (SupergroupEventMessage) -> T): T? = supergroupEventMessageOrNull() ?.let(block) - -public inline fun Message.chatContentMessageOrNull(): ChatContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage - -public inline fun Message.chatContentMessageOrThrow(): ChatContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage - -public inline fun Message.ifChatContentMessage(block: (ChatContentMessage) -> T): T? = chatContentMessageOrNull() ?.let(block) - -public inline fun Message.contentMessageOrNull(): ContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.ContentMessage - -public inline fun Message.contentMessageOrThrow(): ContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.ContentMessage - -public inline fun Message.ifContentMessage(block: (ContentMessage) -> T): T? = contentMessageOrNull() ?.let(block) - -public inline fun Message.possiblyTopicMessageOrNull(): PossiblyTopicMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PossiblyTopicMessage - -public inline fun Message.possiblyTopicMessageOrThrow(): PossiblyTopicMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PossiblyTopicMessage - -public inline fun Message.ifPossiblyTopicMessage(block: (PossiblyTopicMessage) -> T): T? = possiblyTopicMessageOrNull() ?.let(block) - -public inline fun Message.possiblyPaymentMessageOrNull(): PossiblyPaymentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PossiblyPaymentMessage - -public inline fun Message.possiblyPaymentMessageOrThrow(): PossiblyPaymentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PossiblyPaymentMessage - -public inline fun Message.ifPossiblyPaymentMessage(block: (PossiblyPaymentMessage) -> T): T? = possiblyPaymentMessageOrNull() ?.let(block) - -public inline fun Message.possiblyEditedMessageOrNull(): PossiblyEditedMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PossiblyEditedMessage - -public inline fun Message.possiblyEditedMessageOrThrow(): PossiblyEditedMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PossiblyEditedMessage - -public inline fun Message.ifPossiblyEditedMessage(block: (PossiblyEditedMessage) -> T): T? = possiblyEditedMessageOrNull() ?.let(block) - -public inline fun Message.possiblyMediaGroupMessageOrNull(): PossiblyMediaGroupMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PossiblyMediaGroupMessage - -public inline fun Message.possiblyMediaGroupMessageOrThrow(): PossiblyMediaGroupMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PossiblyMediaGroupMessage - -public inline fun Message.ifPossiblyMediaGroupMessage(block: (PossiblyMediaGroupMessage) -> T): T? = possiblyMediaGroupMessageOrNull() ?.let(block) - -public inline fun Message.chatEventMessageOrNull(): ChatEventMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.ChatEventMessage - -public inline fun Message.chatEventMessageOrThrow(): ChatEventMessage = this as dev.inmo.tgbotapi.types.message.abstracts.ChatEventMessage - -public inline fun Message.ifChatEventMessage(block: (ChatEventMessage) -> T): T? = chatEventMessageOrNull() ?.let(block) - public inline fun Message.publicContentMessageOrNull(): PublicContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PublicContentMessage public inline fun Message.publicContentMessageOrThrow(): PublicContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PublicContentMessage public inline fun Message.ifPublicContentMessage(block: (PublicContentMessage) -> T): T? = publicContentMessageOrNull() ?.let(block) +public inline fun Message.privateForumContentMessageOrNull(): PrivateForumContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PrivateForumContentMessage + +public inline fun Message.privateForumContentMessageOrThrow(): PrivateForumContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PrivateForumContentMessage + +public inline fun Message.ifPrivateForumContentMessage(block: (PrivateForumContentMessage) -> T): T? = privateForumContentMessageOrNull() ?.let(block) + +public inline fun Message.possiblySentViaBotCommonMessageOrNull(): PossiblySentViaBotCommonMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PossiblySentViaBotCommonMessage + +public inline fun Message.possiblySentViaBotCommonMessageOrThrow(): PossiblySentViaBotCommonMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PossiblySentViaBotCommonMessage + +public inline fun Message.ifPossiblySentViaBotCommonMessage(block: (PossiblySentViaBotCommonMessage) -> T): T? = possiblySentViaBotCommonMessageOrNull() ?.let(block) + public inline fun Message.channelPaidPostOrNull(): ChannelPaidPost? = this as? dev.inmo.tgbotapi.types.message.abstracts.ChannelPaidPost public inline fun Message.channelPaidPostOrThrow(): ChannelPaidPost = this as dev.inmo.tgbotapi.types.message.abstracts.ChannelPaidPost public inline fun Message.ifChannelPaidPost(block: (ChannelPaidPost) -> T): T? = channelPaidPostOrNull() ?.let(block) -public inline fun Message.channelDirectMessagesEventMessageOrNull(): ChannelDirectMessagesEventMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.ChannelDirectMessagesEventMessage +public inline fun Message.optionallyFromUserMessageOrNull(): OptionallyFromUserMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.OptionallyFromUserMessage -public inline fun Message.channelDirectMessagesEventMessageOrThrow(): ChannelDirectMessagesEventMessage = this as dev.inmo.tgbotapi.types.message.abstracts.ChannelDirectMessagesEventMessage +public inline fun Message.optionallyFromUserMessageOrThrow(): OptionallyFromUserMessage = this as dev.inmo.tgbotapi.types.message.abstracts.OptionallyFromUserMessage -public inline fun Message.ifChannelDirectMessagesEventMessage(block: (ChannelDirectMessagesEventMessage) -> T): T? = channelDirectMessagesEventMessageOrNull() ?.let(block) +public inline fun Message.ifOptionallyFromUserMessage(block: (OptionallyFromUserMessage) -> T): T? = optionallyFromUserMessageOrNull() ?.let(block) + +public inline fun Message.fromUserMessageOrNull(): FromUserMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.FromUserMessage + +public inline fun Message.fromUserMessageOrThrow(): FromUserMessage = this as dev.inmo.tgbotapi.types.message.abstracts.FromUserMessage + +public inline fun Message.ifFromUserMessage(block: (FromUserMessage) -> T): T? = fromUserMessageOrNull() ?.let(block) + +public inline fun Message.fromUserChatMessageOrNull(): FromUserChatMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.FromUserChatMessage + +public inline fun Message.fromUserChatMessageOrThrow(): FromUserChatMessage = this as dev.inmo.tgbotapi.types.message.abstracts.FromUserChatMessage + +public inline fun Message.ifFromUserChatMessage(block: (FromUserChatMessage) -> T): T? = fromUserChatMessageOrNull() ?.let(block) public inline fun Message.possiblyForwardedMessageOrNull(): PossiblyForwardedMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PossiblyForwardedMessage @@ -1732,54 +2304,6 @@ public inline fun Message.possiblyWithEffectMessageOrThrow(): PossiblyWithEffect public inline fun Message.ifPossiblyWithEffectMessage(block: (PossiblyWithEffectMessage) -> T): T? = possiblyWithEffectMessageOrNull() ?.let(block) -public inline fun Message.groupEventMessageOrNull(): GroupEventMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.GroupEventMessage - -public inline fun Message.groupEventMessageOrThrow(): GroupEventMessage = this as dev.inmo.tgbotapi.types.message.abstracts.GroupEventMessage - -public inline fun Message.ifGroupEventMessage(block: (GroupEventMessage) -> T): T? = groupEventMessageOrNull() ?.let(block) - -public inline fun Message.possiblyPaidMessageOrNull(): PossiblyPaidMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PossiblyPaidMessage - -public inline fun Message.possiblyPaidMessageOrThrow(): PossiblyPaidMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PossiblyPaidMessage - -public inline fun Message.ifPossiblyPaidMessage(block: (PossiblyPaidMessage) -> T): T? = possiblyPaidMessageOrNull() ?.let(block) - -public inline fun Message.possiblyOfflineMessageOrNull(): PossiblyOfflineMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PossiblyOfflineMessage - -public inline fun Message.possiblyOfflineMessageOrThrow(): PossiblyOfflineMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PossiblyOfflineMessage - -public inline fun Message.ifPossiblyOfflineMessage(block: (PossiblyOfflineMessage) -> T): T? = possiblyOfflineMessageOrNull() ?.let(block) - -public inline fun Message.signedMessageOrNull(): SignedMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.SignedMessage - -public inline fun Message.signedMessageOrThrow(): SignedMessage = this as dev.inmo.tgbotapi.types.message.abstracts.SignedMessage - -public inline fun Message.ifSignedMessage(block: (SignedMessage) -> T): T? = signedMessageOrNull() ?.let(block) - -public inline fun Message.requestGuestMessageOrNull(): RequestGuestMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.RequestGuestMessage - -public inline fun Message.requestGuestMessageOrThrow(): RequestGuestMessage = this as dev.inmo.tgbotapi.types.message.abstracts.RequestGuestMessage - -public inline fun Message.ifRequestGuestMessage(block: (RequestGuestMessage) -> T): T? = requestGuestMessageOrNull() ?.let(block) - -public inline fun Message.possiblyGuestAnswerMessageOrNull(): PossiblyGuestAnswerMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PossiblyGuestAnswerMessage - -public inline fun Message.possiblyGuestAnswerMessageOrThrow(): PossiblyGuestAnswerMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PossiblyGuestAnswerMessage - -public inline fun Message.ifPossiblyGuestAnswerMessage(block: (PossiblyGuestAnswerMessage) -> T): T? = possiblyGuestAnswerMessageOrNull() ?.let(block) - -public inline fun Message.possiblySentViaBotCommonMessageOrNull(): PossiblySentViaBotCommonMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PossiblySentViaBotCommonMessage - -public inline fun Message.possiblySentViaBotCommonMessageOrThrow(): PossiblySentViaBotCommonMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PossiblySentViaBotCommonMessage - -public inline fun Message.ifPossiblySentViaBotCommonMessage(block: (PossiblySentViaBotCommonMessage) -> T): T? = possiblySentViaBotCommonMessageOrNull() ?.let(block) - -public inline fun Message.privateForumContentMessageOrNull(): PrivateForumContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PrivateForumContentMessage - -public inline fun Message.privateForumContentMessageOrThrow(): PrivateForumContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PrivateForumContentMessage - -public inline fun Message.ifPrivateForumContentMessage(block: (PrivateForumContentMessage) -> T): T? = privateForumContentMessageOrNull() ?.let(block) - public inline fun Message.groupContentMessageOrNull(): GroupContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.GroupContentMessage public inline fun Message.groupContentMessageOrThrow(): GroupContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.GroupContentMessage @@ -1882,35 +2406,83 @@ public inline fun Message.commonSuggestedChannelDirectMessagesContentMessageOrTh public inline fun Message.ifCommonSuggestedChannelDirectMessagesContentMessage(block: (CommonSuggestedChannelDirectMessagesContentMessage) -> T): T? = commonSuggestedChannelDirectMessagesContentMessageOrNull() ?.let(block) -public inline fun Message.channelContentMessageOrNull(): ChannelContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.ChannelContentMessage +public inline fun Message.possiblyGuestAnswerMessageOrNull(): PossiblyGuestAnswerMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PossiblyGuestAnswerMessage -public inline fun Message.channelContentMessageOrThrow(): ChannelContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.ChannelContentMessage +public inline fun Message.possiblyGuestAnswerMessageOrThrow(): PossiblyGuestAnswerMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PossiblyGuestAnswerMessage -public inline fun Message.ifChannelContentMessage(block: (ChannelContentMessage) -> T): T? = channelContentMessageOrNull() ?.let(block) +public inline fun Message.ifPossiblyGuestAnswerMessage(block: (PossiblyGuestAnswerMessage) -> T): T? = possiblyGuestAnswerMessageOrNull() ?.let(block) -public inline fun Message.privateContentMessageOrNull(): PrivateContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PrivateContentMessage +public inline fun Message.groupEventMessageOrNull(): GroupEventMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.GroupEventMessage -public inline fun Message.privateContentMessageOrThrow(): PrivateContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PrivateContentMessage +public inline fun Message.groupEventMessageOrThrow(): GroupEventMessage = this as dev.inmo.tgbotapi.types.message.abstracts.GroupEventMessage -public inline fun Message.ifPrivateContentMessage(block: (PrivateContentMessage) -> T): T? = privateContentMessageOrNull() ?.let(block) +public inline fun Message.ifGroupEventMessage(block: (GroupEventMessage) -> T): T? = groupEventMessageOrNull() ?.let(block) -public inline fun Message.passportMessageOrNull(): PassportMessage? = this as? dev.inmo.tgbotapi.types.message.PassportMessage +public inline fun Message.possiblyPaymentMessageOrNull(): PossiblyPaymentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PossiblyPaymentMessage -public inline fun Message.passportMessageOrThrow(): PassportMessage = this as dev.inmo.tgbotapi.types.message.PassportMessage +public inline fun Message.possiblyPaymentMessageOrThrow(): PossiblyPaymentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PossiblyPaymentMessage -public inline fun Message.ifPassportMessage(block: (PassportMessage) -> T): T? = passportMessageOrNull() ?.let(block) +public inline fun Message.ifPossiblyPaymentMessage(block: (PossiblyPaymentMessage) -> T): T? = possiblyPaymentMessageOrNull() ?.let(block) -public inline fun Message.privateEventMessageOrNull(): PrivateEventMessage? = this as? dev.inmo.tgbotapi.types.message.PrivateEventMessage +public inline fun Message.supergroupEventMessageOrNull(): SupergroupEventMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.SupergroupEventMessage -public inline fun Message.privateEventMessageOrThrow(): PrivateEventMessage = this as dev.inmo.tgbotapi.types.message.PrivateEventMessage +public inline fun Message.supergroupEventMessageOrThrow(): SupergroupEventMessage = this as dev.inmo.tgbotapi.types.message.abstracts.SupergroupEventMessage -public inline fun Message.ifPrivateEventMessage(block: (PrivateEventMessage) -> T): T? = privateEventMessageOrNull() ?.let(block) +public inline fun Message.ifSupergroupEventMessage(block: (SupergroupEventMessage) -> T): T? = supergroupEventMessageOrNull() ?.let(block) -public inline fun Message.commonChannelDirectMessagesEventMessageOrNull(): CommonChannelDirectMessagesEventMessage? = this as? dev.inmo.tgbotapi.types.message.CommonChannelDirectMessagesEventMessage +public inline fun Message.signedMessageOrNull(): SignedMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.SignedMessage -public inline fun Message.commonChannelDirectMessagesEventMessageOrThrow(): CommonChannelDirectMessagesEventMessage = this as dev.inmo.tgbotapi.types.message.CommonChannelDirectMessagesEventMessage +public inline fun Message.signedMessageOrThrow(): SignedMessage = this as dev.inmo.tgbotapi.types.message.abstracts.SignedMessage -public inline fun Message.ifCommonChannelDirectMessagesEventMessage(block: (CommonChannelDirectMessagesEventMessage) -> T): T? = commonChannelDirectMessagesEventMessageOrNull() ?.let(block) +public inline fun Message.ifSignedMessage(block: (SignedMessage) -> T): T? = signedMessageOrNull() ?.let(block) + +public inline fun Message.businessContentMessageOrNull(): BusinessContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.BusinessContentMessage + +public inline fun Message.businessContentMessageOrThrow(): BusinessContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.BusinessContentMessage + +public inline fun Message.ifBusinessContentMessage(block: (BusinessContentMessage) -> T): T? = businessContentMessageOrNull() ?.let(block) + +public inline fun Message.requestGuestMessageOrNull(): RequestGuestMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.RequestGuestMessage + +public inline fun Message.requestGuestMessageOrThrow(): RequestGuestMessage = this as dev.inmo.tgbotapi.types.message.abstracts.RequestGuestMessage + +public inline fun Message.ifRequestGuestMessage(block: (RequestGuestMessage) -> T): T? = requestGuestMessageOrNull() ?.let(block) + +public inline fun Message.possiblyOfflineMessageOrNull(): PossiblyOfflineMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PossiblyOfflineMessage + +public inline fun Message.possiblyOfflineMessageOrThrow(): PossiblyOfflineMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PossiblyOfflineMessage + +public inline fun Message.ifPossiblyOfflineMessage(block: (PossiblyOfflineMessage) -> T): T? = possiblyOfflineMessageOrNull() ?.let(block) + +public inline fun Message.possiblyEditedMessageOrNull(): PossiblyEditedMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PossiblyEditedMessage + +public inline fun Message.possiblyEditedMessageOrThrow(): PossiblyEditedMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PossiblyEditedMessage + +public inline fun Message.ifPossiblyEditedMessage(block: (PossiblyEditedMessage) -> T): T? = possiblyEditedMessageOrNull() ?.let(block) + +public inline fun Message.commonContentMessageOrNull(): CommonContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.CommonContentMessage + +public inline fun Message.commonContentMessageOrThrow(): CommonContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.CommonContentMessage + +public inline fun Message.ifCommonContentMessage(block: (CommonContentMessage) -> T): T? = commonContentMessageOrNull() ?.let(block) + +public inline fun Message.contentMessageOrNull(): ContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.ContentMessage + +public inline fun Message.contentMessageOrThrow(): ContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.ContentMessage + +public inline fun Message.ifContentMessage(block: (ContentMessage) -> T): T? = contentMessageOrNull() ?.let(block) + +public inline fun Message.possiblyMediaGroupMessageOrNull(): PossiblyMediaGroupMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PossiblyMediaGroupMessage + +public inline fun Message.possiblyMediaGroupMessageOrThrow(): PossiblyMediaGroupMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PossiblyMediaGroupMessage + +public inline fun Message.ifPossiblyMediaGroupMessage(block: (PossiblyMediaGroupMessage) -> T): T? = possiblyMediaGroupMessageOrNull() ?.let(block) + +public inline fun Message.requestGuestContentMessageOrNull(): RequestGuestContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.RequestGuestContentMessage + +public inline fun Message.requestGuestContentMessageOrThrow(): RequestGuestContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.RequestGuestContentMessage + +public inline fun Message.ifRequestGuestContentMessage(block: (RequestGuestContentMessage) -> T): T? = requestGuestContentMessageOrNull() ?.let(block) public inline fun Message.commonGroupEventMessageOrNull(): CommonGroupEventMessage? = this as? dev.inmo.tgbotapi.types.message.CommonGroupEventMessage @@ -1918,383 +2490,29 @@ public inline fun Message.commonGroupEventMessageOrThrow(): CommonGroupEventMess public inline fun Message.ifCommonGroupEventMessage(block: (CommonGroupEventMessage) -> T): T? = commonGroupEventMessageOrNull() ?.let(block) -public inline fun ResendableContent.videoNoteContentOrNull(): VideoNoteContent? = this as? dev.inmo.tgbotapi.types.message.content.VideoNoteContent +public inline fun Message.privateForumEventMessageOrNull(): PrivateForumEventMessage? = this as? dev.inmo.tgbotapi.types.message.PrivateForumEventMessage -public inline fun ResendableContent.videoNoteContentOrThrow(): VideoNoteContent = this as dev.inmo.tgbotapi.types.message.content.VideoNoteContent +public inline fun Message.privateForumEventMessageOrThrow(): PrivateForumEventMessage = this as dev.inmo.tgbotapi.types.message.PrivateForumEventMessage -public inline fun ResendableContent.ifVideoNoteContent(block: (VideoNoteContent) -> T): T? = videoNoteContentOrNull() ?.let(block) +public inline fun Message.ifPrivateForumEventMessage(block: (PrivateForumEventMessage) -> T): T? = privateForumEventMessageOrNull() ?.let(block) -public inline fun ResendableContent.voiceContentOrNull(): VoiceContent? = this as? dev.inmo.tgbotapi.types.message.content.VoiceContent +public inline fun Message.commonSupergroupEventMessageOrNull(): CommonSupergroupEventMessage? = this as? dev.inmo.tgbotapi.types.message.CommonSupergroupEventMessage -public inline fun ResendableContent.voiceContentOrThrow(): VoiceContent = this as dev.inmo.tgbotapi.types.message.content.VoiceContent +public inline fun Message.commonSupergroupEventMessageOrThrow(): CommonSupergroupEventMessage = this as dev.inmo.tgbotapi.types.message.CommonSupergroupEventMessage -public inline fun ResendableContent.ifVoiceContent(block: (VoiceContent) -> T): T? = voiceContentOrNull() ?.let(block) +public inline fun Message.ifCommonSupergroupEventMessage(block: (CommonSupergroupEventMessage) -> T): T? = commonSupergroupEventMessageOrNull() ?.let(block) -public inline fun ResendableContent.giveawayContentOrNull(): GiveawayContent? = this as? dev.inmo.tgbotapi.types.message.content.GiveawayContent +public inline fun Location.staticLocationOrNull(): StaticLocation? = this as? dev.inmo.tgbotapi.types.location.StaticLocation -public inline fun ResendableContent.giveawayContentOrThrow(): GiveawayContent = this as dev.inmo.tgbotapi.types.message.content.GiveawayContent +public inline fun Location.staticLocationOrThrow(): StaticLocation = this as dev.inmo.tgbotapi.types.location.StaticLocation -public inline fun ResendableContent.ifGiveawayContent(block: (GiveawayContent) -> T): T? = giveawayContentOrNull() ?.let(block) +public inline fun Location.ifStaticLocation(block: (StaticLocation) -> T): T? = staticLocationOrNull() ?.let(block) -public inline fun ResendableContent.stickerContentOrNull(): StickerContent? = this as? dev.inmo.tgbotapi.types.message.content.StickerContent +public inline fun Location.liveLocationOrNull(): LiveLocation? = this as? dev.inmo.tgbotapi.types.location.LiveLocation -public inline fun ResendableContent.stickerContentOrThrow(): StickerContent = this as dev.inmo.tgbotapi.types.message.content.StickerContent +public inline fun Location.liveLocationOrThrow(): LiveLocation = this as dev.inmo.tgbotapi.types.location.LiveLocation -public inline fun ResendableContent.ifStickerContent(block: (StickerContent) -> T): T? = stickerContentOrNull() ?.let(block) - -public inline fun ResendableContent.invoiceContentOrNull(): InvoiceContent? = this as? dev.inmo.tgbotapi.types.message.content.InvoiceContent - -public inline fun ResendableContent.invoiceContentOrThrow(): InvoiceContent = this as dev.inmo.tgbotapi.types.message.content.InvoiceContent - -public inline fun ResendableContent.ifInvoiceContent(block: (InvoiceContent) -> T): T? = invoiceContentOrNull() ?.let(block) - -public inline fun ResendableContent.documentContentOrNull(): DocumentContent? = this as? dev.inmo.tgbotapi.types.message.content.DocumentContent - -public inline fun ResendableContent.documentContentOrThrow(): DocumentContent = this as dev.inmo.tgbotapi.types.message.content.DocumentContent - -public inline fun ResendableContent.ifDocumentContent(block: (DocumentContent) -> T): T? = documentContentOrNull() ?.let(block) - -public inline fun ResendableContent.pollContentOrNull(): PollContent? = this as? dev.inmo.tgbotapi.types.message.content.PollContent - -public inline fun ResendableContent.pollContentOrThrow(): PollContent = this as dev.inmo.tgbotapi.types.message.content.PollContent - -public inline fun ResendableContent.ifPollContent(block: (PollContent) -> T): T? = pollContentOrNull() ?.let(block) - -public inline fun ResendableContent.diceContentOrNull(): DiceContent? = this as? dev.inmo.tgbotapi.types.message.content.DiceContent - -public inline fun ResendableContent.diceContentOrThrow(): DiceContent = this as dev.inmo.tgbotapi.types.message.content.DiceContent - -public inline fun ResendableContent.ifDiceContent(block: (DiceContent) -> T): T? = diceContentOrNull() ?.let(block) - -public inline fun ResendableContent.videoContentOrNull(): VideoContent? = this as? dev.inmo.tgbotapi.types.message.content.VideoContent - -public inline fun ResendableContent.videoContentOrThrow(): VideoContent = this as dev.inmo.tgbotapi.types.message.content.VideoContent - -public inline fun ResendableContent.ifVideoContent(block: (VideoContent) -> T): T? = videoContentOrNull() ?.let(block) - -public inline fun ResendableContent.gameContentOrNull(): GameContent? = this as? dev.inmo.tgbotapi.types.message.content.GameContent - -public inline fun ResendableContent.gameContentOrThrow(): GameContent = this as dev.inmo.tgbotapi.types.message.content.GameContent - -public inline fun ResendableContent.ifGameContent(block: (GameContent) -> T): T? = gameContentOrNull() ?.let(block) - -public inline fun ResendableContent.locationContentOrNull(): LocationContent? = this as? dev.inmo.tgbotapi.types.message.content.LocationContent - -public inline fun ResendableContent.locationContentOrThrow(): LocationContent = this as dev.inmo.tgbotapi.types.message.content.LocationContent - -public inline fun ResendableContent.ifLocationContent(block: (LocationContent) -> T): T? = locationContentOrNull() ?.let(block) - -public inline fun ResendableContent.liveLocationContentOrNull(): LiveLocationContent? = this as? dev.inmo.tgbotapi.types.message.content.LiveLocationContent - -public inline fun ResendableContent.liveLocationContentOrThrow(): LiveLocationContent = this as dev.inmo.tgbotapi.types.message.content.LiveLocationContent - -public inline fun ResendableContent.ifLiveLocationContent(block: (LiveLocationContent) -> T): T? = liveLocationContentOrNull() ?.let(block) - -public inline fun ResendableContent.staticLocationContentOrNull(): StaticLocationContent? = this as? dev.inmo.tgbotapi.types.message.content.StaticLocationContent - -public inline fun ResendableContent.staticLocationContentOrThrow(): StaticLocationContent = this as dev.inmo.tgbotapi.types.message.content.StaticLocationContent - -public inline fun ResendableContent.ifStaticLocationContent(block: (StaticLocationContent) -> T): T? = staticLocationContentOrNull() ?.let(block) - -public inline fun ResendableContent.paidMediaInfoContentOrNull(): PaidMediaInfoContent? = this as? dev.inmo.tgbotapi.types.message.content.PaidMediaInfoContent - -public inline fun ResendableContent.paidMediaInfoContentOrThrow(): PaidMediaInfoContent = this as dev.inmo.tgbotapi.types.message.content.PaidMediaInfoContent - -public inline fun ResendableContent.ifPaidMediaInfoContent(block: (PaidMediaInfoContent) -> T): T? = paidMediaInfoContentOrNull() ?.let(block) - -public inline fun ResendableContent.venueContentOrNull(): VenueContent? = this as? dev.inmo.tgbotapi.types.message.content.VenueContent - -public inline fun ResendableContent.venueContentOrThrow(): VenueContent = this as dev.inmo.tgbotapi.types.message.content.VenueContent - -public inline fun ResendableContent.ifVenueContent(block: (VenueContent) -> T): T? = venueContentOrNull() ?.let(block) - -public inline fun ResendableContent.giveawayPublicResultsContentOrNull(): GiveawayPublicResultsContent? = this as? dev.inmo.tgbotapi.types.message.content.GiveawayPublicResultsContent - -public inline fun ResendableContent.giveawayPublicResultsContentOrThrow(): GiveawayPublicResultsContent = this as dev.inmo.tgbotapi.types.message.content.GiveawayPublicResultsContent - -public inline fun ResendableContent.ifGiveawayPublicResultsContent(block: (GiveawayPublicResultsContent) -> T): T? = giveawayPublicResultsContentOrNull() ?.let(block) - -public inline fun ResendableContent.contactContentOrNull(): ContactContent? = this as? dev.inmo.tgbotapi.types.message.content.ContactContent - -public inline fun ResendableContent.contactContentOrThrow(): ContactContent = this as dev.inmo.tgbotapi.types.message.content.ContactContent - -public inline fun ResendableContent.ifContactContent(block: (ContactContent) -> T): T? = contactContentOrNull() ?.let(block) - -public inline fun ResendableContent.audioMediaGroupPartContentOrNull(): AudioMediaGroupPartContent? = this as? dev.inmo.tgbotapi.types.message.content.AudioMediaGroupPartContent - -public inline fun ResendableContent.audioMediaGroupPartContentOrThrow(): AudioMediaGroupPartContent = this as dev.inmo.tgbotapi.types.message.content.AudioMediaGroupPartContent - -public inline fun ResendableContent.ifAudioMediaGroupPartContent(block: (AudioMediaGroupPartContent) -> T): T? = audioMediaGroupPartContentOrNull() ?.let(block) - -public inline fun ResendableContent.documentMediaGroupPartContentOrNull(): DocumentMediaGroupPartContent? = this as? dev.inmo.tgbotapi.types.message.content.DocumentMediaGroupPartContent - -public inline fun ResendableContent.documentMediaGroupPartContentOrThrow(): DocumentMediaGroupPartContent = this as dev.inmo.tgbotapi.types.message.content.DocumentMediaGroupPartContent - -public inline fun ResendableContent.ifDocumentMediaGroupPartContent(block: (DocumentMediaGroupPartContent) -> T): T? = documentMediaGroupPartContentOrNull() ?.let(block) - -public inline fun ResendableContent.textedMediaContentOrNull(): TextedMediaContent? = this as? dev.inmo.tgbotapi.types.message.content.TextedMediaContent - -public inline fun ResendableContent.textedMediaContentOrThrow(): TextedMediaContent = this as dev.inmo.tgbotapi.types.message.content.TextedMediaContent - -public inline fun ResendableContent.ifTextedMediaContent(block: (TextedMediaContent) -> T): T? = textedMediaContentOrNull() ?.let(block) - -public inline fun ResendableContent.mediaGroupCollectionContentOrNull(): MediaGroupCollectionContent? = this as? dev.inmo.tgbotapi.types.message.content.MediaGroupCollectionContent - -public inline fun ResendableContent.mediaGroupCollectionContentOrThrow(): MediaGroupCollectionContent = this as dev.inmo.tgbotapi.types.message.content.MediaGroupCollectionContent - -public inline fun ResendableContent.ifMediaGroupCollectionContent(block: (MediaGroupCollectionContent) -> T): T? = mediaGroupCollectionContentOrNull() ?.let(block) - -public inline fun ResendableContent.mediaGroupPartContentOrNull(): MediaGroupPartContent? = this as? dev.inmo.tgbotapi.types.message.content.MediaGroupPartContent - -public inline fun ResendableContent.mediaGroupPartContentOrThrow(): MediaGroupPartContent = this as dev.inmo.tgbotapi.types.message.content.MediaGroupPartContent - -public inline fun ResendableContent.ifMediaGroupPartContent(block: (MediaGroupPartContent) -> T): T? = mediaGroupPartContentOrNull() ?.let(block) - -public inline fun ResendableContent.visualMediaGroupPartContentOrNull(): VisualMediaGroupPartContent? = this as? dev.inmo.tgbotapi.types.message.content.VisualMediaGroupPartContent - -public inline fun ResendableContent.visualMediaGroupPartContentOrThrow(): VisualMediaGroupPartContent = this as dev.inmo.tgbotapi.types.message.content.VisualMediaGroupPartContent - -public inline fun ResendableContent.ifVisualMediaGroupPartContent(block: (VisualMediaGroupPartContent) -> T): T? = visualMediaGroupPartContentOrNull() ?.let(block) - -public inline fun ResendableContent.storyContentOrNull(): StoryContent? = this as? dev.inmo.tgbotapi.types.message.content.StoryContent - -public inline fun ResendableContent.storyContentOrThrow(): StoryContent = this as dev.inmo.tgbotapi.types.message.content.StoryContent - -public inline fun ResendableContent.ifStoryContent(block: (StoryContent) -> T): T? = storyContentOrNull() ?.let(block) - -public inline fun ResendableContent.messageContentOrNull(): MessageContent? = this as? dev.inmo.tgbotapi.types.message.content.MessageContent - -public inline fun ResendableContent.messageContentOrThrow(): MessageContent = this as dev.inmo.tgbotapi.types.message.content.MessageContent - -public inline fun ResendableContent.ifMessageContent(block: (MessageContent) -> T): T? = messageContentOrNull() ?.let(block) - -public inline fun ResendableContent.mediaCollectionContentOrNull(): MediaCollectionContent? = this as? dev.inmo.tgbotapi.types.message.content.MediaCollectionContent - -public inline fun ResendableContent.mediaCollectionContentOrThrow(): MediaCollectionContent = this as dev.inmo.tgbotapi.types.message.content.MediaCollectionContent - -public inline fun ResendableContent.ifMediaCollectionContent(block: (MediaCollectionContent) -> T): T? = mediaCollectionContentOrNull() ?.let(block) - -public inline fun ResendableContent.textedContentOrNull(): TextedContent? = this as? dev.inmo.tgbotapi.types.message.content.TextedContent - -public inline fun ResendableContent.textedContentOrThrow(): TextedContent = this as dev.inmo.tgbotapi.types.message.content.TextedContent - -public inline fun ResendableContent.ifTextedContent(block: (TextedContent) -> T): T? = textedContentOrNull() ?.let(block) - -public inline fun ResendableContent.mediaContentOrNull(): MediaContent? = this as? dev.inmo.tgbotapi.types.message.content.MediaContent - -public inline fun ResendableContent.mediaContentOrThrow(): MediaContent = this as dev.inmo.tgbotapi.types.message.content.MediaContent - -public inline fun ResendableContent.ifMediaContent(block: (MediaContent) -> T): T? = mediaContentOrNull() ?.let(block) - -public inline fun ResendableContent.spoilerableMediaContentOrNull(): SpoilerableMediaContent? = this as? dev.inmo.tgbotapi.types.message.content.SpoilerableMediaContent - -public inline fun ResendableContent.spoilerableMediaContentOrThrow(): SpoilerableMediaContent = this as dev.inmo.tgbotapi.types.message.content.SpoilerableMediaContent - -public inline fun ResendableContent.ifSpoilerableMediaContent(block: (SpoilerableMediaContent) -> T): T? = spoilerableMediaContentOrNull() ?.let(block) - -public inline fun ResendableContent.withCustomizedCaptionMediaContentOrNull(): WithCustomizedCaptionMediaContent? = this as? dev.inmo.tgbotapi.types.message.content.WithCustomizedCaptionMediaContent - -public inline fun ResendableContent.withCustomizedCaptionMediaContentOrThrow(): WithCustomizedCaptionMediaContent = this as dev.inmo.tgbotapi.types.message.content.WithCustomizedCaptionMediaContent - -public inline fun ResendableContent.ifWithCustomizedCaptionMediaContent(block: (WithCustomizedCaptionMediaContent) -> T): T? = withCustomizedCaptionMediaContentOrNull() ?.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 ResendableContent.ifChecklistContent(block: (ChecklistContent) -> T): T? = checklistContentOrNull() ?.let(block) - -public inline fun ResendableContent.animationContentOrNull(): AnimationContent? = this as? dev.inmo.tgbotapi.types.message.content.AnimationContent - -public inline fun ResendableContent.animationContentOrThrow(): AnimationContent = this as dev.inmo.tgbotapi.types.message.content.AnimationContent - -public inline fun ResendableContent.ifAnimationContent(block: (AnimationContent) -> T): T? = animationContentOrNull() ?.let(block) - -public inline fun ResendableContent.mediaGroupContentOrNull(): MediaGroupContent? = this as? dev.inmo.tgbotapi.types.message.content.MediaGroupContent - -public inline fun ResendableContent.mediaGroupContentOrThrow(): MediaGroupContent = this as dev.inmo.tgbotapi.types.message.content.MediaGroupContent - -public inline fun ResendableContent.ifMediaGroupContent(block: (MediaGroupContent) -> T): T? = mediaGroupContentOrNull() ?.let(block) - -public inline fun ResendableContent.photoContentOrNull(): PhotoContent? = this as? dev.inmo.tgbotapi.types.message.content.PhotoContent - -public inline fun ResendableContent.photoContentOrThrow(): PhotoContent = this as dev.inmo.tgbotapi.types.message.content.PhotoContent - -public inline fun ResendableContent.ifPhotoContent(block: (PhotoContent) -> T): T? = photoContentOrNull() ?.let(block) - -public inline fun ResendableContent.audioContentOrNull(): AudioContent? = this as? dev.inmo.tgbotapi.types.message.content.AudioContent - -public inline fun ResendableContent.audioContentOrThrow(): AudioContent = this as dev.inmo.tgbotapi.types.message.content.AudioContent - -public inline fun ResendableContent.ifAudioContent(block: (AudioContent) -> T): T? = audioContentOrNull() ?.let(block) - -public inline fun ResendableContent.textContentOrNull(): TextContent? = this as? dev.inmo.tgbotapi.types.message.content.TextContent - -public inline fun ResendableContent.textContentOrThrow(): TextContent = this as dev.inmo.tgbotapi.types.message.content.TextContent - -public inline fun ResendableContent.ifTextContent(block: (TextContent) -> T): T? = textContentOrNull() ?.let(block) - -public inline fun ResendableContent.livePhotoContentOrNull(): LivePhotoContent? = this as? dev.inmo.tgbotapi.types.message.content.LivePhotoContent - -public inline fun ResendableContent.livePhotoContentOrThrow(): LivePhotoContent = this as dev.inmo.tgbotapi.types.message.content.LivePhotoContent - -public inline fun ResendableContent.ifLivePhotoContent(block: (LivePhotoContent) -> T): T? = livePhotoContentOrNull() ?.let(block) - -public inline fun TextSource.uRLTextSourceOrNull(): URLTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.URLTextSource - -public inline fun TextSource.uRLTextSourceOrThrow(): URLTextSource = this as dev.inmo.tgbotapi.types.message.textsources.URLTextSource - -public inline fun TextSource.ifURLTextSource(block: (URLTextSource) -> T): T? = uRLTextSourceOrNull() ?.let(block) - -public inline fun TextSource.phoneNumberTextSourceOrNull(): PhoneNumberTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.PhoneNumberTextSource - -public inline fun TextSource.phoneNumberTextSourceOrThrow(): PhoneNumberTextSource = this as dev.inmo.tgbotapi.types.message.textsources.PhoneNumberTextSource - -public inline fun TextSource.ifPhoneNumberTextSource(block: (PhoneNumberTextSource) -> T): T? = phoneNumberTextSourceOrNull() ?.let(block) - -public inline fun TextSource.eMailTextSourceOrNull(): EMailTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.EMailTextSource - -public inline fun TextSource.eMailTextSourceOrThrow(): EMailTextSource = this as dev.inmo.tgbotapi.types.message.textsources.EMailTextSource - -public inline fun TextSource.ifEMailTextSource(block: (EMailTextSource) -> T): T? = eMailTextSourceOrNull() ?.let(block) - -public inline fun TextSource.expandableBlockquoteTextSourceOrNull(): ExpandableBlockquoteTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.ExpandableBlockquoteTextSource - -public inline fun TextSource.expandableBlockquoteTextSourceOrThrow(): ExpandableBlockquoteTextSource = this as dev.inmo.tgbotapi.types.message.textsources.ExpandableBlockquoteTextSource - -public inline fun TextSource.ifExpandableBlockquoteTextSource(block: (ExpandableBlockquoteTextSource) -> T): T? = expandableBlockquoteTextSourceOrNull() ?.let(block) - -public inline fun TextSource.regularTextSourceOrNull(): RegularTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.RegularTextSource - -public inline fun TextSource.regularTextSourceOrThrow(): RegularTextSource = this as dev.inmo.tgbotapi.types.message.textsources.RegularTextSource - -public inline fun TextSource.ifRegularTextSource(block: (RegularTextSource) -> T): T? = regularTextSourceOrNull() ?.let(block) - -public inline fun TextSource.multilevelTextSourceOrNull(): MultilevelTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.MultilevelTextSource - -public inline fun TextSource.multilevelTextSourceOrThrow(): MultilevelTextSource = this as dev.inmo.tgbotapi.types.message.textsources.MultilevelTextSource - -public inline fun TextSource.ifMultilevelTextSource(block: (MultilevelTextSource) -> T): T? = multilevelTextSourceOrNull() ?.let(block) - -public inline fun TextSource.codeTextSourceOrNull(): CodeTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.CodeTextSource - -public inline fun TextSource.codeTextSourceOrThrow(): CodeTextSource = this as dev.inmo.tgbotapi.types.message.textsources.CodeTextSource - -public inline fun TextSource.ifCodeTextSource(block: (CodeTextSource) -> T): T? = codeTextSourceOrNull() ?.let(block) - -public inline fun TextSource.strikethroughTextSourceOrNull(): StrikethroughTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.StrikethroughTextSource - -public inline fun TextSource.strikethroughTextSourceOrThrow(): StrikethroughTextSource = this as dev.inmo.tgbotapi.types.message.textsources.StrikethroughTextSource - -public inline fun TextSource.ifStrikethroughTextSource(block: (StrikethroughTextSource) -> T): T? = strikethroughTextSourceOrNull() ?.let(block) - -public inline fun TextSource.botCommandTextSourceOrNull(): BotCommandTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.BotCommandTextSource - -public inline fun TextSource.botCommandTextSourceOrThrow(): BotCommandTextSource = this as dev.inmo.tgbotapi.types.message.textsources.BotCommandTextSource - -public inline fun TextSource.ifBotCommandTextSource(block: (BotCommandTextSource) -> T): T? = botCommandTextSourceOrNull() ?.let(block) - -public inline fun TextSource.textLinkTextSourceOrNull(): TextLinkTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.TextLinkTextSource - -public inline fun TextSource.textLinkTextSourceOrThrow(): TextLinkTextSource = this as dev.inmo.tgbotapi.types.message.textsources.TextLinkTextSource - -public inline fun TextSource.ifTextLinkTextSource(block: (TextLinkTextSource) -> T): T? = textLinkTextSourceOrNull() ?.let(block) - -public inline fun TextSource.underlineTextSourceOrNull(): UnderlineTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.UnderlineTextSource - -public inline fun TextSource.underlineTextSourceOrThrow(): UnderlineTextSource = this as dev.inmo.tgbotapi.types.message.textsources.UnderlineTextSource - -public inline fun TextSource.ifUnderlineTextSource(block: (UnderlineTextSource) -> T): T? = underlineTextSourceOrNull() ?.let(block) - -public inline fun TextSource.boldTextSourceOrNull(): BoldTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.BoldTextSource - -public inline fun TextSource.boldTextSourceOrThrow(): BoldTextSource = this as dev.inmo.tgbotapi.types.message.textsources.BoldTextSource - -public inline fun TextSource.ifBoldTextSource(block: (BoldTextSource) -> T): T? = boldTextSourceOrNull() ?.let(block) - -public inline fun TextSource.mentionTextSourceOrNull(): MentionTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.MentionTextSource - -public inline fun TextSource.mentionTextSourceOrThrow(): MentionTextSource = this as dev.inmo.tgbotapi.types.message.textsources.MentionTextSource - -public inline fun TextSource.ifMentionTextSource(block: (MentionTextSource) -> T): T? = mentionTextSourceOrNull() ?.let(block) - -public inline fun TextSource.customEmojiTextSourceOrNull(): CustomEmojiTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.CustomEmojiTextSource - -public inline fun TextSource.customEmojiTextSourceOrThrow(): CustomEmojiTextSource = this as dev.inmo.tgbotapi.types.message.textsources.CustomEmojiTextSource - -public inline fun TextSource.ifCustomEmojiTextSource(block: (CustomEmojiTextSource) -> T): T? = customEmojiTextSourceOrNull() ?.let(block) - -public inline fun TextSource.blockquoteTextSourceOrNull(): BlockquoteTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.BlockquoteTextSource - -public inline fun TextSource.blockquoteTextSourceOrThrow(): BlockquoteTextSource = this as dev.inmo.tgbotapi.types.message.textsources.BlockquoteTextSource - -public inline fun TextSource.ifBlockquoteTextSource(block: (BlockquoteTextSource) -> T): T? = blockquoteTextSourceOrNull() ?.let(block) - -public inline fun TextSource.textMentionTextSourceOrNull(): TextMentionTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.TextMentionTextSource - -public inline fun TextSource.textMentionTextSourceOrThrow(): TextMentionTextSource = this as dev.inmo.tgbotapi.types.message.textsources.TextMentionTextSource - -public inline fun TextSource.ifTextMentionTextSource(block: (TextMentionTextSource) -> T): T? = textMentionTextSourceOrNull() ?.let(block) - -public inline fun TextSource.hashTagTextSourceOrNull(): HashTagTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.HashTagTextSource - -public inline fun TextSource.hashTagTextSourceOrThrow(): HashTagTextSource = this as dev.inmo.tgbotapi.types.message.textsources.HashTagTextSource - -public inline fun TextSource.ifHashTagTextSource(block: (HashTagTextSource) -> T): T? = hashTagTextSourceOrNull() ?.let(block) - -public inline fun TextSource.cashTagTextSourceOrNull(): CashTagTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.CashTagTextSource - -public inline fun TextSource.cashTagTextSourceOrThrow(): CashTagTextSource = this as dev.inmo.tgbotapi.types.message.textsources.CashTagTextSource - -public inline fun TextSource.ifCashTagTextSource(block: (CashTagTextSource) -> T): T? = cashTagTextSourceOrNull() ?.let(block) - -public inline fun TextSource.italicTextSourceOrNull(): ItalicTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.ItalicTextSource - -public inline fun TextSource.italicTextSourceOrThrow(): ItalicTextSource = this as dev.inmo.tgbotapi.types.message.textsources.ItalicTextSource - -public inline fun TextSource.ifItalicTextSource(block: (ItalicTextSource) -> T): T? = italicTextSourceOrNull() ?.let(block) - -public inline fun TextSource.dateTimeTextSourceOrNull(): DateTimeTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.DateTimeTextSource - -public inline fun TextSource.dateTimeTextSourceOrThrow(): DateTimeTextSource = this as dev.inmo.tgbotapi.types.message.textsources.DateTimeTextSource - -public inline fun TextSource.ifDateTimeTextSource(block: (DateTimeTextSource) -> T): T? = dateTimeTextSourceOrNull() ?.let(block) - -public inline fun TextSource.spoilerTextSourceOrNull(): SpoilerTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.SpoilerTextSource - -public inline fun TextSource.spoilerTextSourceOrThrow(): SpoilerTextSource = this as dev.inmo.tgbotapi.types.message.textsources.SpoilerTextSource - -public inline fun TextSource.ifSpoilerTextSource(block: (SpoilerTextSource) -> T): T? = spoilerTextSourceOrNull() ?.let(block) - -public inline fun TextSource.preTextSourceOrNull(): PreTextSource? = this as? dev.inmo.tgbotapi.types.message.textsources.PreTextSource - -public inline fun TextSource.preTextSourceOrThrow(): PreTextSource = this as dev.inmo.tgbotapi.types.message.textsources.PreTextSource - -public inline fun TextSource.ifPreTextSource(block: (PreTextSource) -> T): T? = preTextSourceOrNull() ?.let(block) - -public inline fun RevenueWithdrawalState.pendingOrNull(): RevenueWithdrawalState.Pending? = this as? dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Pending - -public inline fun RevenueWithdrawalState.pendingOrThrow(): RevenueWithdrawalState.Pending = this as dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Pending - -public inline fun RevenueWithdrawalState.ifPending(block: (RevenueWithdrawalState.Pending) -> T): T? = pendingOrNull() ?.let(block) - -public inline fun RevenueWithdrawalState.succeededOrNull(): RevenueWithdrawalState.Succeeded? = this as? dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Succeeded - -public inline fun RevenueWithdrawalState.succeededOrThrow(): RevenueWithdrawalState.Succeeded = this as dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Succeeded - -public inline fun RevenueWithdrawalState.ifSucceeded(block: (RevenueWithdrawalState.Succeeded) -> T): T? = succeededOrNull() ?.let(block) - -public inline fun RevenueWithdrawalState.failedOrNull(): RevenueWithdrawalState.Failed? = this as? dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Failed - -public inline fun RevenueWithdrawalState.failedOrThrow(): RevenueWithdrawalState.Failed = this as dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Failed - -public inline fun RevenueWithdrawalState.ifFailed(block: (RevenueWithdrawalState.Failed) -> T): T? = failedOrNull() ?.let(block) - -public inline fun RevenueWithdrawalState.unknownOrNull(): RevenueWithdrawalState.Unknown? = this as? dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Unknown - -public inline fun RevenueWithdrawalState.unknownOrThrow(): RevenueWithdrawalState.Unknown = this as dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Unknown - -public inline fun RevenueWithdrawalState.ifUnknown(block: (RevenueWithdrawalState.Unknown) -> T): T? = unknownOrNull() ?.let(block) +public inline fun Location.ifLiveLocation(block: (LiveLocation) -> T): T? = liveLocationOrNull() ?.let(block) public inline fun StarTransaction.incomingOrNull(): StarTransaction.Incoming? = this as? dev.inmo.tgbotapi.types.payments.stars.StarTransaction.Incoming @@ -2362,173 +2580,167 @@ public inline fun TransactionPartner.unknownOrThrow(): TransactionPartner.Unknow public inline fun TransactionPartner.ifUnknown(block: (TransactionPartner.Unknown) -> T): T? = unknownOrNull() ?.let(block) -public inline fun ScheduledCloseInfo.exactScheduledCloseInfoOrNull(): ExactScheduledCloseInfo? = this as? dev.inmo.tgbotapi.types.polls.ExactScheduledCloseInfo +public inline fun RevenueWithdrawalState.pendingOrNull(): RevenueWithdrawalState.Pending? = this as? dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Pending -public inline fun ScheduledCloseInfo.exactScheduledCloseInfoOrThrow(): ExactScheduledCloseInfo = this as dev.inmo.tgbotapi.types.polls.ExactScheduledCloseInfo +public inline fun RevenueWithdrawalState.pendingOrThrow(): RevenueWithdrawalState.Pending = this as dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Pending -public inline fun ScheduledCloseInfo.ifExactScheduledCloseInfo(block: (ExactScheduledCloseInfo) -> T): T? = exactScheduledCloseInfoOrNull() ?.let(block) +public inline fun RevenueWithdrawalState.ifPending(block: (RevenueWithdrawalState.Pending) -> T): T? = pendingOrNull() ?.let(block) -public inline fun ScheduledCloseInfo.approximateScheduledCloseInfoOrNull(): ApproximateScheduledCloseInfo? = this as? dev.inmo.tgbotapi.types.polls.ApproximateScheduledCloseInfo +public inline fun RevenueWithdrawalState.succeededOrNull(): RevenueWithdrawalState.Succeeded? = this as? dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Succeeded -public inline fun ScheduledCloseInfo.approximateScheduledCloseInfoOrThrow(): ApproximateScheduledCloseInfo = this as dev.inmo.tgbotapi.types.polls.ApproximateScheduledCloseInfo +public inline fun RevenueWithdrawalState.succeededOrThrow(): RevenueWithdrawalState.Succeeded = this as dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Succeeded -public inline fun ScheduledCloseInfo.ifApproximateScheduledCloseInfo(block: (ApproximateScheduledCloseInfo) -> T): T? = approximateScheduledCloseInfoOrNull() ?.let(block) +public inline fun RevenueWithdrawalState.ifSucceeded(block: (RevenueWithdrawalState.Succeeded) -> T): T? = succeededOrNull() ?.let(block) -public inline fun Poll.unknownPollTypeOrNull(): UnknownPollType? = this as? dev.inmo.tgbotapi.types.polls.UnknownPollType +public inline fun RevenueWithdrawalState.failedOrNull(): RevenueWithdrawalState.Failed? = this as? dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Failed -public inline fun Poll.unknownPollTypeOrThrow(): UnknownPollType = this as dev.inmo.tgbotapi.types.polls.UnknownPollType +public inline fun RevenueWithdrawalState.failedOrThrow(): RevenueWithdrawalState.Failed = this as dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Failed -public inline fun Poll.ifUnknownPollType(block: (UnknownPollType) -> T): T? = unknownPollTypeOrNull() ?.let(block) +public inline fun RevenueWithdrawalState.ifFailed(block: (RevenueWithdrawalState.Failed) -> T): T? = failedOrNull() ?.let(block) -public inline fun Poll.regularPollOrNull(): RegularPoll? = this as? dev.inmo.tgbotapi.types.polls.RegularPoll +public inline fun RevenueWithdrawalState.unknownOrNull(): RevenueWithdrawalState.Unknown? = this as? dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Unknown -public inline fun Poll.regularPollOrThrow(): RegularPoll = this as dev.inmo.tgbotapi.types.polls.RegularPoll +public inline fun RevenueWithdrawalState.unknownOrThrow(): RevenueWithdrawalState.Unknown = this as dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Unknown -public inline fun Poll.ifRegularPoll(block: (RegularPoll) -> T): T? = regularPollOrNull() ?.let(block) +public inline fun RevenueWithdrawalState.ifUnknown(block: (RevenueWithdrawalState.Unknown) -> T): T? = unknownOrNull() ?.let(block) -public inline fun Poll.quizPollOrNull(): QuizPoll? = this as? dev.inmo.tgbotapi.types.polls.QuizPoll +public inline fun Reaction.emojiOrNull(): Reaction.Emoji? = this as? dev.inmo.tgbotapi.types.reactions.Reaction.Emoji -public inline fun Poll.quizPollOrThrow(): QuizPoll = this as dev.inmo.tgbotapi.types.polls.QuizPoll +public inline fun Reaction.emojiOrThrow(): Reaction.Emoji = this as dev.inmo.tgbotapi.types.reactions.Reaction.Emoji -public inline fun Poll.ifQuizPoll(block: (QuizPoll) -> T): T? = quizPollOrNull() ?.let(block) +public inline fun Reaction.ifEmoji(block: (Reaction.Emoji) -> T): T? = emojiOrNull() ?.let(block) -public inline fun BackgroundFill.solidOrNull(): BackgroundFill.Solid? = this as? dev.inmo.tgbotapi.types.BackgroundFill.Solid +public inline fun Reaction.customEmojiOrNull(): Reaction.CustomEmoji? = this as? dev.inmo.tgbotapi.types.reactions.Reaction.CustomEmoji -public inline fun BackgroundFill.solidOrThrow(): BackgroundFill.Solid = this as dev.inmo.tgbotapi.types.BackgroundFill.Solid +public inline fun Reaction.customEmojiOrThrow(): Reaction.CustomEmoji = this as dev.inmo.tgbotapi.types.reactions.Reaction.CustomEmoji -public inline fun BackgroundFill.ifSolid(block: (BackgroundFill.Solid) -> T): T? = solidOrNull() ?.let(block) +public inline fun Reaction.ifCustomEmoji(block: (Reaction.CustomEmoji) -> T): T? = customEmojiOrNull() ?.let(block) -public inline fun BackgroundFill.gradientOrNull(): BackgroundFill.Gradient? = this as? dev.inmo.tgbotapi.types.BackgroundFill.Gradient +public inline fun Reaction.paidOrNull(): Reaction.Paid? = this as? dev.inmo.tgbotapi.types.reactions.Reaction.Paid -public inline fun BackgroundFill.gradientOrThrow(): BackgroundFill.Gradient = this as dev.inmo.tgbotapi.types.BackgroundFill.Gradient +public inline fun Reaction.paidOrThrow(): Reaction.Paid = this as dev.inmo.tgbotapi.types.reactions.Reaction.Paid -public inline fun BackgroundFill.ifGradient(block: (BackgroundFill.Gradient) -> T): T? = gradientOrNull() ?.let(block) +public inline fun Reaction.ifPaid(block: (Reaction.Paid) -> T): T? = paidOrNull() ?.let(block) -public inline fun BackgroundFill.freeformGradientOrNull(): BackgroundFill.FreeformGradient? = this as? dev.inmo.tgbotapi.types.BackgroundFill.FreeformGradient +public inline fun Reaction.unknownOrNull(): Reaction.Unknown? = this as? dev.inmo.tgbotapi.types.reactions.Reaction.Unknown -public inline fun BackgroundFill.freeformGradientOrThrow(): BackgroundFill.FreeformGradient = this as dev.inmo.tgbotapi.types.BackgroundFill.FreeformGradient +public inline fun Reaction.unknownOrThrow(): Reaction.Unknown = this as dev.inmo.tgbotapi.types.reactions.Reaction.Unknown -public inline fun BackgroundFill.ifFreeformGradient(block: (BackgroundFill.FreeformGradient) -> T): T? = freeformGradientOrNull() ?.let(block) +public inline fun Reaction.ifUnknown(block: (Reaction.Unknown) -> T): T? = unknownOrNull() ?.let(block) -public inline fun BackgroundFill.unknownOrNull(): BackgroundFill.Unknown? = this as? dev.inmo.tgbotapi.types.BackgroundFill.Unknown +public inline fun SecureValue.otherDocumentsSecureValueOrNull(): OtherDocumentsSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.OtherDocumentsSecureValue -public inline fun BackgroundFill.unknownOrThrow(): BackgroundFill.Unknown = this as dev.inmo.tgbotapi.types.BackgroundFill.Unknown +public inline fun SecureValue.otherDocumentsSecureValueOrThrow(): OtherDocumentsSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.OtherDocumentsSecureValue -public inline fun BackgroundFill.ifUnknown(block: (BackgroundFill.Unknown) -> T): T? = unknownOrNull() ?.let(block) +public inline fun SecureValue.ifOtherDocumentsSecureValue(block: (OtherDocumentsSecureValue) -> T): T? = otherDocumentsSecureValueOrNull() ?.let(block) -public inline fun Location.staticLocationOrNull(): StaticLocation? = this as? dev.inmo.tgbotapi.types.location.StaticLocation +public inline fun SecureValue.utilityBillSecureValueOrNull(): UtilityBillSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.UtilityBillSecureValue -public inline fun Location.staticLocationOrThrow(): StaticLocation = this as dev.inmo.tgbotapi.types.location.StaticLocation +public inline fun SecureValue.utilityBillSecureValueOrThrow(): UtilityBillSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.UtilityBillSecureValue -public inline fun Location.ifStaticLocation(block: (StaticLocation) -> T): T? = staticLocationOrNull() ?.let(block) +public inline fun SecureValue.ifUtilityBillSecureValue(block: (UtilityBillSecureValue) -> T): T? = utilityBillSecureValueOrNull() ?.let(block) -public inline fun Location.liveLocationOrNull(): LiveLocation? = this as? dev.inmo.tgbotapi.types.location.LiveLocation +public inline fun SecureValue.bankStatementSecureValueOrNull(): BankStatementSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.BankStatementSecureValue -public inline fun Location.liveLocationOrThrow(): LiveLocation = this as dev.inmo.tgbotapi.types.location.LiveLocation +public inline fun SecureValue.bankStatementSecureValueOrThrow(): BankStatementSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.BankStatementSecureValue -public inline fun Location.ifLiveLocation(block: (LiveLocation) -> T): T? = liveLocationOrNull() ?.let(block) +public inline fun SecureValue.ifBankStatementSecureValue(block: (BankStatementSecureValue) -> T): T? = bankStatementSecureValueOrNull() ?.let(block) -public inline fun ChatIdentifier.idChatIdentifierOrNull(): IdChatIdentifier? = this as? dev.inmo.tgbotapi.types.IdChatIdentifier +public inline fun SecureValue.rentalAgreementSecureValueOrNull(): RentalAgreementSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.RentalAgreementSecureValue -public inline fun ChatIdentifier.idChatIdentifierOrThrow(): IdChatIdentifier = this as dev.inmo.tgbotapi.types.IdChatIdentifier +public inline fun SecureValue.rentalAgreementSecureValueOrThrow(): RentalAgreementSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.RentalAgreementSecureValue -public inline fun ChatIdentifier.ifIdChatIdentifier(block: (IdChatIdentifier) -> T): T? = idChatIdentifierOrNull() ?.let(block) +public inline fun SecureValue.ifRentalAgreementSecureValue(block: (RentalAgreementSecureValue) -> T): T? = rentalAgreementSecureValueOrNull() ?.let(block) -public inline fun ChatIdentifier.chatIdOrNull(): ChatId? = this as? dev.inmo.tgbotapi.types.ChatId +public inline fun SecureValue.passportRegistrationSecureValueOrNull(): PassportRegistrationSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.PassportRegistrationSecureValue -public inline fun ChatIdentifier.chatIdOrThrow(): ChatId = this as dev.inmo.tgbotapi.types.ChatId +public inline fun SecureValue.passportRegistrationSecureValueOrThrow(): PassportRegistrationSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.PassportRegistrationSecureValue -public inline fun ChatIdentifier.ifChatId(block: (ChatId) -> T): T? = chatIdOrNull() ?.let(block) +public inline fun SecureValue.ifPassportRegistrationSecureValue(block: (PassportRegistrationSecureValue) -> T): T? = passportRegistrationSecureValueOrNull() ?.let(block) -public inline fun ChatIdentifier.chatIdWithThreadIdOrNull(): ChatIdWithThreadId? = this as? dev.inmo.tgbotapi.types.ChatIdWithThreadId +public inline fun SecureValue.temporalRegistrationSecureValueOrNull(): TemporalRegistrationSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.TemporalRegistrationSecureValue -public inline fun ChatIdentifier.chatIdWithThreadIdOrThrow(): ChatIdWithThreadId = this as dev.inmo.tgbotapi.types.ChatIdWithThreadId +public inline fun SecureValue.temporalRegistrationSecureValueOrThrow(): TemporalRegistrationSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.TemporalRegistrationSecureValue -public inline fun ChatIdentifier.ifChatIdWithThreadId(block: (ChatIdWithThreadId) -> T): T? = chatIdWithThreadIdOrNull() ?.let(block) +public inline fun SecureValue.ifTemporalRegistrationSecureValue(block: (TemporalRegistrationSecureValue) -> T): T? = temporalRegistrationSecureValueOrNull() ?.let(block) -public inline fun ChatIdentifier.chatIdWithChannelDirectMessageThreadIdOrNull(): ChatIdWithChannelDirectMessageThreadId? = this as? dev.inmo.tgbotapi.types.ChatIdWithChannelDirectMessageThreadId +public inline fun SecureValue.identityWithReverseSideSecureValueOrNull(): IdentityWithReverseSideSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.IdentityWithReverseSideSecureValue -public inline fun ChatIdentifier.chatIdWithChannelDirectMessageThreadIdOrThrow(): ChatIdWithChannelDirectMessageThreadId = this as dev.inmo.tgbotapi.types.ChatIdWithChannelDirectMessageThreadId +public inline fun SecureValue.identityWithReverseSideSecureValueOrThrow(): IdentityWithReverseSideSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.IdentityWithReverseSideSecureValue -public inline fun ChatIdentifier.ifChatIdWithChannelDirectMessageThreadId(block: (ChatIdWithChannelDirectMessageThreadId) -> T): T? = chatIdWithChannelDirectMessageThreadIdOrNull() ?.let(block) +public inline fun SecureValue.ifIdentityWithReverseSideSecureValue(block: (IdentityWithReverseSideSecureValue) -> T): T? = identityWithReverseSideSecureValueOrNull() ?.let(block) -public inline fun ChatIdentifier.businessChatIdOrNull(): BusinessChatId? = this as? dev.inmo.tgbotapi.types.BusinessChatId +public inline fun SecureValue.driverLicenseSecureValueOrNull(): DriverLicenseSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.DriverLicenseSecureValue -public inline fun ChatIdentifier.businessChatIdOrThrow(): BusinessChatId = this as dev.inmo.tgbotapi.types.BusinessChatId +public inline fun SecureValue.driverLicenseSecureValueOrThrow(): DriverLicenseSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.DriverLicenseSecureValue -public inline fun ChatIdentifier.ifBusinessChatId(block: (BusinessChatId) -> T): T? = businessChatIdOrNull() ?.let(block) +public inline fun SecureValue.ifDriverLicenseSecureValue(block: (DriverLicenseSecureValue) -> T): T? = driverLicenseSecureValueOrNull() ?.let(block) -public inline fun ChatIdentifier.usernameOrNull(): Username? = this as? dev.inmo.tgbotapi.types.Username +public inline fun SecureValue.identityCardSecureValueOrNull(): IdentityCardSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.IdentityCardSecureValue -public inline fun ChatIdentifier.usernameOrThrow(): Username = this as dev.inmo.tgbotapi.types.Username +public inline fun SecureValue.identityCardSecureValueOrThrow(): IdentityCardSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.IdentityCardSecureValue -public inline fun ChatIdentifier.ifUsername(block: (Username) -> T): T? = usernameOrNull() ?.let(block) +public inline fun SecureValue.ifIdentityCardSecureValue(block: (IdentityCardSecureValue) -> T): T? = identityCardSecureValueOrNull() ?.let(block) -public inline fun ChatBoostSource.byUserOrNull(): ChatBoostSource.ByUser? = this as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.ByUser +public inline fun SecureValue.passportSecureValueOrNull(): PassportSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.PassportSecureValue -public inline fun ChatBoostSource.byUserOrThrow(): ChatBoostSource.ByUser = this as dev.inmo.tgbotapi.types.boosts.ChatBoostSource.ByUser +public inline fun SecureValue.passportSecureValueOrThrow(): PassportSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.PassportSecureValue -public inline fun ChatBoostSource.ifByUser(block: (ChatBoostSource.ByUser) -> T): T? = byUserOrNull() ?.let(block) +public inline fun SecureValue.ifPassportSecureValue(block: (PassportSecureValue) -> T): T? = passportSecureValueOrNull() ?.let(block) -public inline fun ChatBoostSource.premiumOrNull(): ChatBoostSource.Premium? = this as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Premium +public inline fun SecureValue.commonPassportSecureValueOrNull(): CommonPassportSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.CommonPassportSecureValue -public inline fun ChatBoostSource.premiumOrThrow(): ChatBoostSource.Premium = this as dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Premium +public inline fun SecureValue.commonPassportSecureValueOrThrow(): CommonPassportSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.CommonPassportSecureValue -public inline fun ChatBoostSource.ifPremium(block: (ChatBoostSource.Premium) -> T): T? = premiumOrNull() ?.let(block) +public inline fun SecureValue.ifCommonPassportSecureValue(block: (CommonPassportSecureValue) -> T): T? = commonPassportSecureValueOrNull() ?.let(block) -public inline fun ChatBoostSource.giftCodeOrNull(): ChatBoostSource.GiftCode? = this as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.GiftCode +public inline fun SecureValue.internalPassportSecureValueOrNull(): InternalPassportSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.InternalPassportSecureValue -public inline fun ChatBoostSource.giftCodeOrThrow(): ChatBoostSource.GiftCode = this as dev.inmo.tgbotapi.types.boosts.ChatBoostSource.GiftCode +public inline fun SecureValue.internalPassportSecureValueOrThrow(): InternalPassportSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.InternalPassportSecureValue -public inline fun ChatBoostSource.ifGiftCode(block: (ChatBoostSource.GiftCode) -> T): T? = giftCodeOrNull() ?.let(block) +public inline fun SecureValue.ifInternalPassportSecureValue(block: (InternalPassportSecureValue) -> T): T? = internalPassportSecureValueOrNull() ?.let(block) -public inline fun ChatBoostSource.giveawayOrNull(): ChatBoostSource.Giveaway? = this as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway +public inline fun SecureValue.personalDetailsSecureValueOrNull(): PersonalDetailsSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.PersonalDetailsSecureValue -public inline fun ChatBoostSource.giveawayOrThrow(): ChatBoostSource.Giveaway = this as dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway +public inline fun SecureValue.personalDetailsSecureValueOrThrow(): PersonalDetailsSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.PersonalDetailsSecureValue -public inline fun ChatBoostSource.ifGiveaway(block: (ChatBoostSource.Giveaway) -> T): T? = giveawayOrNull() ?.let(block) +public inline fun SecureValue.ifPersonalDetailsSecureValue(block: (PersonalDetailsSecureValue) -> T): T? = personalDetailsSecureValueOrNull() ?.let(block) -public inline fun ChatBoostSource.unknownOrNull(): ChatBoostSource.Unknown? = this as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Unknown +public inline fun SecureValue.addressSecureValueOrNull(): AddressSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.AddressSecureValue -public inline fun ChatBoostSource.unknownOrThrow(): ChatBoostSource.Unknown = this as dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Unknown +public inline fun SecureValue.addressSecureValueOrThrow(): AddressSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.AddressSecureValue -public inline fun ChatBoostSource.ifUnknown(block: (ChatBoostSource.Unknown) -> T): T? = unknownOrNull() ?.let(block) +public inline fun SecureValue.ifAddressSecureValue(block: (AddressSecureValue) -> T): T? = addressSecureValueOrNull() ?.let(block) -public inline fun ChatBoostSource.giveawayCreatedOrNull(): ChatBoostSource.Giveaway.Created? = this as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Created +public inline fun SecureValue.secureValueIdentityOrNull(): SecureValueIdentity? = this as? dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueIdentity -public inline fun ChatBoostSource.giveawayCreatedOrThrow(): ChatBoostSource.Giveaway.Created = this as dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Created +public inline fun SecureValue.secureValueIdentityOrThrow(): SecureValueIdentity = this as dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueIdentity -public inline fun ChatBoostSource.ifGiveawayCreated(block: (ChatBoostSource.Giveaway.Created) -> T): T? = giveawayCreatedOrNull() ?.let(block) +public inline fun SecureValue.ifSecureValueIdentity(block: (SecureValueIdentity) -> T): T? = secureValueIdentityOrNull() ?.let(block) -public inline fun ChatBoostSource.giveawayClaimedOrNull(): ChatBoostSource.Giveaway.Claimed? = this as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Claimed +public inline fun SecureValue.secureValueWithTranslationsOrNull(): SecureValueWithTranslations? = this as? dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithTranslations -public inline fun ChatBoostSource.giveawayClaimedOrThrow(): ChatBoostSource.Giveaway.Claimed = this as dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Claimed +public inline fun SecureValue.secureValueWithTranslationsOrThrow(): SecureValueWithTranslations = this as dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithTranslations -public inline fun ChatBoostSource.ifGiveawayClaimed(block: (ChatBoostSource.Giveaway.Claimed) -> T): T? = giveawayClaimedOrNull() ?.let(block) +public inline fun SecureValue.ifSecureValueWithTranslations(block: (SecureValueWithTranslations) -> T): T? = secureValueWithTranslationsOrNull() ?.let(block) -public inline fun ChatBoostSource.giveawayUnclaimedOrNull(): ChatBoostSource.Giveaway.Unclaimed? = this as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Unclaimed +public inline fun SecureValue.secureValueWithDataOrNull(): SecureValueWithData? = this as? dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithData -public inline fun ChatBoostSource.giveawayUnclaimedOrThrow(): ChatBoostSource.Giveaway.Unclaimed = this as dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Unclaimed +public inline fun SecureValue.secureValueWithDataOrThrow(): SecureValueWithData = this as dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithData -public inline fun ChatBoostSource.ifGiveawayUnclaimed(block: (ChatBoostSource.Giveaway.Unclaimed) -> T): T? = giveawayUnclaimedOrNull() ?.let(block) +public inline fun SecureValue.ifSecureValueWithData(block: (SecureValueWithData) -> T): T? = secureValueWithDataOrNull() ?.let(block) -public inline fun RequestResponse.usersSharedOrNull(): UsersShared? = this as? dev.inmo.tgbotapi.types.request.UsersShared +public inline fun SecureValue.secureValueWithFilesOrNull(): SecureValueWithFiles? = this as? dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithFiles -public inline fun RequestResponse.usersSharedOrThrow(): UsersShared = this as dev.inmo.tgbotapi.types.request.UsersShared +public inline fun SecureValue.secureValueWithFilesOrThrow(): SecureValueWithFiles = this as dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithFiles -public inline fun RequestResponse.ifUsersShared(block: (UsersShared) -> T): T? = usersSharedOrNull() ?.let(block) +public inline fun SecureValue.ifSecureValueWithFiles(block: (SecureValueWithFiles) -> T): T? = secureValueWithFilesOrNull() ?.let(block) -public inline fun RequestResponse.chatSharedOrNull(): ChatShared? = this as? dev.inmo.tgbotapi.types.request.ChatShared +public inline fun SecureValue.secureValueWithReverseSideOrNull(): SecureValueWithReverseSide? = this as? dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithReverseSide -public inline fun RequestResponse.chatSharedOrThrow(): ChatShared = this as dev.inmo.tgbotapi.types.request.ChatShared +public inline fun SecureValue.secureValueWithReverseSideOrThrow(): SecureValueWithReverseSide = this as dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithReverseSide -public inline fun RequestResponse.ifChatShared(block: (ChatShared) -> T): T? = chatSharedOrNull() ?.let(block) - -public inline fun RequestResponse.chatSharedRequestOrNull(): ChatSharedRequest? = this as? dev.inmo.tgbotapi.types.request.ChatSharedRequest - -public inline fun RequestResponse.chatSharedRequestOrThrow(): ChatSharedRequest = this as dev.inmo.tgbotapi.types.request.ChatSharedRequest - -public inline fun RequestResponse.ifChatSharedRequest(block: (ChatSharedRequest) -> T): T? = chatSharedRequestOrNull() ?.let(block) +public inline fun SecureValue.ifSecureValueWithReverseSide(block: (SecureValueWithReverseSide) -> T): T? = secureValueWithReverseSideOrNull() ?.let(block) public inline fun PassportElementError.unknownPassportElementErrorOrNull(): UnknownPassportElementError? = this as? dev.inmo.tgbotapi.types.passport.UnknownPassportElementError @@ -2620,11 +2832,89 @@ public inline fun EncryptedPassportElement.encryptedAddressOrThrow(): EncryptedA public inline fun EncryptedPassportElement.ifEncryptedAddress(block: (EncryptedAddress) -> T): T? = encryptedAddressOrNull() ?.let(block) -public inline fun EncryptedPassportElement.phoneNumberOrNull(): PhoneNumber? = this as? dev.inmo.tgbotapi.types.passport.encrypted.PhoneNumber +public inline fun EncryptedPassportElement.encryptedPersonalDetailsOrNull(): EncryptedPersonalDetails? = this as? dev.inmo.tgbotapi.types.passport.encrypted.EncryptedPersonalDetails -public inline fun EncryptedPassportElement.phoneNumberOrThrow(): PhoneNumber = this as dev.inmo.tgbotapi.types.passport.encrypted.PhoneNumber +public inline fun EncryptedPassportElement.encryptedPersonalDetailsOrThrow(): EncryptedPersonalDetails = this as dev.inmo.tgbotapi.types.passport.encrypted.EncryptedPersonalDetails -public inline fun EncryptedPassportElement.ifPhoneNumber(block: (PhoneNumber) -> T): T? = phoneNumberOrNull() ?.let(block) +public inline fun EncryptedPassportElement.ifEncryptedPersonalDetails(block: (EncryptedPersonalDetails) -> T): T? = encryptedPersonalDetailsOrNull() ?.let(block) + +public inline fun EncryptedPassportElement.emailOrNull(): Email? = this as? dev.inmo.tgbotapi.types.passport.encrypted.Email + +public inline fun EncryptedPassportElement.emailOrThrow(): Email = this as dev.inmo.tgbotapi.types.passport.encrypted.Email + +public inline fun EncryptedPassportElement.ifEmail(block: (Email) -> T): T? = emailOrNull() ?.let(block) + +public inline fun EncryptedPassportElement.encryptedPassportElementWithTranslatableIDDocumentOrNull(): EncryptedPassportElementWithTranslatableIDDocument? = this as? dev.inmo.tgbotapi.types.passport.encrypted.EncryptedPassportElementWithTranslatableIDDocument + +public inline fun EncryptedPassportElement.encryptedPassportElementWithTranslatableIDDocumentOrThrow(): EncryptedPassportElementWithTranslatableIDDocument = this as dev.inmo.tgbotapi.types.passport.encrypted.EncryptedPassportElementWithTranslatableIDDocument + +public inline fun EncryptedPassportElement.ifEncryptedPassportElementWithTranslatableIDDocument(block: (EncryptedPassportElementWithTranslatableIDDocument) -> T): T? = encryptedPassportElementWithTranslatableIDDocumentOrNull() ?.let(block) + +public inline fun EncryptedPassportElement.driverLicenseOrNull(): DriverLicense? = this as? dev.inmo.tgbotapi.types.passport.encrypted.DriverLicense + +public inline fun EncryptedPassportElement.driverLicenseOrThrow(): DriverLicense = this as dev.inmo.tgbotapi.types.passport.encrypted.DriverLicense + +public inline fun EncryptedPassportElement.ifDriverLicense(block: (DriverLicense) -> T): T? = driverLicenseOrNull() ?.let(block) + +public inline fun EncryptedPassportElement.identityCardOrNull(): IdentityCard? = this as? dev.inmo.tgbotapi.types.passport.encrypted.IdentityCard + +public inline fun EncryptedPassportElement.identityCardOrThrow(): IdentityCard = this as dev.inmo.tgbotapi.types.passport.encrypted.IdentityCard + +public inline fun EncryptedPassportElement.ifIdentityCard(block: (IdentityCard) -> T): T? = identityCardOrNull() ?.let(block) + +public inline fun EncryptedPassportElement.encryptedPassportElementTranslatableOrNull(): EncryptedPassportElementTranslatable? = this as? dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementTranslatable + +public inline fun EncryptedPassportElement.encryptedPassportElementTranslatableOrThrow(): EncryptedPassportElementTranslatable = this as dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementTranslatable + +public inline fun EncryptedPassportElement.ifEncryptedPassportElementTranslatable(block: (EncryptedPassportElementTranslatable) -> T): T? = encryptedPassportElementTranslatableOrNull() ?.let(block) + +public inline fun EncryptedPassportElement.encryptedPassportElementWithSelfieOrNull(): EncryptedPassportElementWithSelfie? = this as? dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithSelfie + +public inline fun EncryptedPassportElement.encryptedPassportElementWithSelfieOrThrow(): EncryptedPassportElementWithSelfie = this as dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithSelfie + +public inline fun EncryptedPassportElement.ifEncryptedPassportElementWithSelfie(block: (EncryptedPassportElementWithSelfie) -> T): T? = encryptedPassportElementWithSelfieOrNull() ?.let(block) + +public inline fun EncryptedPassportElement.encryptedPassportElementWithPhoneNumberOrNull(): EncryptedPassportElementWithPhoneNumber? = this as? dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithPhoneNumber + +public inline fun EncryptedPassportElement.encryptedPassportElementWithPhoneNumberOrThrow(): EncryptedPassportElementWithPhoneNumber = this as dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithPhoneNumber + +public inline fun EncryptedPassportElement.ifEncryptedPassportElementWithPhoneNumber(block: (EncryptedPassportElementWithPhoneNumber) -> T): T? = encryptedPassportElementWithPhoneNumberOrNull() ?.let(block) + +public inline fun EncryptedPassportElement.encryptedPassportElementWithReverseSideOrNull(): EncryptedPassportElementWithReverseSide? = this as? dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithReverseSide + +public inline fun EncryptedPassportElement.encryptedPassportElementWithReverseSideOrThrow(): EncryptedPassportElementWithReverseSide = this as dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithReverseSide + +public inline fun EncryptedPassportElement.ifEncryptedPassportElementWithReverseSide(block: (EncryptedPassportElementWithReverseSide) -> T): T? = encryptedPassportElementWithReverseSideOrNull() ?.let(block) + +public inline fun EncryptedPassportElement.encryptedPassportElementWithFilesCollectionOrNull(): EncryptedPassportElementWithFilesCollection? = this as? dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithFilesCollection + +public inline fun EncryptedPassportElement.encryptedPassportElementWithFilesCollectionOrThrow(): EncryptedPassportElementWithFilesCollection = this as dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithFilesCollection + +public inline fun EncryptedPassportElement.ifEncryptedPassportElementWithFilesCollection(block: (EncryptedPassportElementWithFilesCollection) -> T): T? = encryptedPassportElementWithFilesCollectionOrNull() ?.let(block) + +public inline fun EncryptedPassportElement.unknownEncryptedPassportElementOrNull(): UnknownEncryptedPassportElement? = this as? dev.inmo.tgbotapi.types.passport.encrypted.abstracts.UnknownEncryptedPassportElement + +public inline fun EncryptedPassportElement.unknownEncryptedPassportElementOrThrow(): UnknownEncryptedPassportElement = this as dev.inmo.tgbotapi.types.passport.encrypted.abstracts.UnknownEncryptedPassportElement + +public inline fun EncryptedPassportElement.ifUnknownEncryptedPassportElement(block: (UnknownEncryptedPassportElement) -> T): T? = unknownEncryptedPassportElementOrNull() ?.let(block) + +public inline fun EncryptedPassportElement.encryptedPassportElementWithEmailOrNull(): EncryptedPassportElementWithEmail? = this as? dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithEmail + +public inline fun EncryptedPassportElement.encryptedPassportElementWithEmailOrThrow(): EncryptedPassportElementWithEmail = this as dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithEmail + +public inline fun EncryptedPassportElement.ifEncryptedPassportElementWithEmail(block: (EncryptedPassportElementWithEmail) -> T): T? = encryptedPassportElementWithEmailOrNull() ?.let(block) + +public inline fun EncryptedPassportElement.encryptedPassportElementWithFrontSideOrNull(): EncryptedPassportElementWithFrontSide? = this as? dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithFrontSide + +public inline fun EncryptedPassportElement.encryptedPassportElementWithFrontSideOrThrow(): EncryptedPassportElementWithFrontSide = this as dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithFrontSide + +public inline fun EncryptedPassportElement.ifEncryptedPassportElementWithFrontSide(block: (EncryptedPassportElementWithFrontSide) -> T): T? = encryptedPassportElementWithFrontSideOrNull() ?.let(block) + +public inline fun EncryptedPassportElement.encryptedPassportElementWithDataOrNull(): EncryptedPassportElementWithData? = this as? dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithData + +public inline fun EncryptedPassportElement.encryptedPassportElementWithDataOrThrow(): EncryptedPassportElementWithData = this as dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithData + +public inline fun EncryptedPassportElement.ifEncryptedPassportElementWithData(block: (EncryptedPassportElementWithData) -> T): T? = encryptedPassportElementWithDataOrNull() ?.let(block) public inline fun EncryptedPassportElement.passportOrNull(): Passport? = this as? dev.inmo.tgbotapi.types.passport.encrypted.Passport @@ -2644,6 +2934,12 @@ public inline fun EncryptedPassportElement.internalPassportOrThrow(): InternalPa public inline fun EncryptedPassportElement.ifInternalPassport(block: (InternalPassport) -> T): T? = internalPassportOrNull() ?.let(block) +public inline fun EncryptedPassportElement.phoneNumberOrNull(): PhoneNumber? = this as? dev.inmo.tgbotapi.types.passport.encrypted.PhoneNumber + +public inline fun EncryptedPassportElement.phoneNumberOrThrow(): PhoneNumber = this as dev.inmo.tgbotapi.types.passport.encrypted.PhoneNumber + +public inline fun EncryptedPassportElement.ifPhoneNumber(block: (PhoneNumber) -> T): T? = phoneNumberOrNull() ?.let(block) + public inline fun EncryptedPassportElement.encryptedPassportElementWithTranslatableFilesCollectionOrNull(): EncryptedPassportElementWithTranslatableFilesCollection? = this as? dev.inmo.tgbotapi.types.passport.encrypted.EncryptedPassportElementWithTranslatableFilesCollection public inline fun EncryptedPassportElement.encryptedPassportElementWithTranslatableFilesCollectionOrThrow(): EncryptedPassportElementWithTranslatableFilesCollection = this as dev.inmo.tgbotapi.types.passport.encrypted.EncryptedPassportElementWithTranslatableFilesCollection @@ -2680,383 +2976,827 @@ public inline fun EncryptedPassportElement.temporaryRegistrationOrThrow(): Tempo public inline fun EncryptedPassportElement.ifTemporaryRegistration(block: (TemporaryRegistration) -> T): T? = temporaryRegistrationOrNull() ?.let(block) -public inline fun EncryptedPassportElement.emailOrNull(): Email? = this as? dev.inmo.tgbotapi.types.passport.encrypted.Email +public inline fun ChatIdentifier.idChatIdentifierOrNull(): IdChatIdentifier? = this as? dev.inmo.tgbotapi.types.IdChatIdentifier -public inline fun EncryptedPassportElement.emailOrThrow(): Email = this as dev.inmo.tgbotapi.types.passport.encrypted.Email +public inline fun ChatIdentifier.idChatIdentifierOrThrow(): IdChatIdentifier = this as dev.inmo.tgbotapi.types.IdChatIdentifier -public inline fun EncryptedPassportElement.ifEmail(block: (Email) -> T): T? = emailOrNull() ?.let(block) +public inline fun ChatIdentifier.ifIdChatIdentifier(block: (IdChatIdentifier) -> T): T? = idChatIdentifierOrNull() ?.let(block) -public inline fun EncryptedPassportElement.encryptedPassportElementWithTranslatableIDDocumentOrNull(): EncryptedPassportElementWithTranslatableIDDocument? = this as? dev.inmo.tgbotapi.types.passport.encrypted.EncryptedPassportElementWithTranslatableIDDocument +public inline fun ChatIdentifier.chatIdOrNull(): ChatId? = this as? dev.inmo.tgbotapi.types.ChatId -public inline fun EncryptedPassportElement.encryptedPassportElementWithTranslatableIDDocumentOrThrow(): EncryptedPassportElementWithTranslatableIDDocument = this as dev.inmo.tgbotapi.types.passport.encrypted.EncryptedPassportElementWithTranslatableIDDocument +public inline fun ChatIdentifier.chatIdOrThrow(): ChatId = this as dev.inmo.tgbotapi.types.ChatId -public inline fun EncryptedPassportElement.ifEncryptedPassportElementWithTranslatableIDDocument(block: (EncryptedPassportElementWithTranslatableIDDocument) -> T): T? = encryptedPassportElementWithTranslatableIDDocumentOrNull() ?.let(block) +public inline fun ChatIdentifier.ifChatId(block: (ChatId) -> T): T? = chatIdOrNull() ?.let(block) -public inline fun EncryptedPassportElement.driverLicenseOrNull(): DriverLicense? = this as? dev.inmo.tgbotapi.types.passport.encrypted.DriverLicense +public inline fun ChatIdentifier.chatIdWithThreadIdOrNull(): ChatIdWithThreadId? = this as? dev.inmo.tgbotapi.types.ChatIdWithThreadId -public inline fun EncryptedPassportElement.driverLicenseOrThrow(): DriverLicense = this as dev.inmo.tgbotapi.types.passport.encrypted.DriverLicense +public inline fun ChatIdentifier.chatIdWithThreadIdOrThrow(): ChatIdWithThreadId = this as dev.inmo.tgbotapi.types.ChatIdWithThreadId -public inline fun EncryptedPassportElement.ifDriverLicense(block: (DriverLicense) -> T): T? = driverLicenseOrNull() ?.let(block) +public inline fun ChatIdentifier.ifChatIdWithThreadId(block: (ChatIdWithThreadId) -> T): T? = chatIdWithThreadIdOrNull() ?.let(block) -public inline fun EncryptedPassportElement.identityCardOrNull(): IdentityCard? = this as? dev.inmo.tgbotapi.types.passport.encrypted.IdentityCard +public inline fun ChatIdentifier.chatIdWithChannelDirectMessageThreadIdOrNull(): ChatIdWithChannelDirectMessageThreadId? = this as? dev.inmo.tgbotapi.types.ChatIdWithChannelDirectMessageThreadId -public inline fun EncryptedPassportElement.identityCardOrThrow(): IdentityCard = this as dev.inmo.tgbotapi.types.passport.encrypted.IdentityCard +public inline fun ChatIdentifier.chatIdWithChannelDirectMessageThreadIdOrThrow(): ChatIdWithChannelDirectMessageThreadId = this as dev.inmo.tgbotapi.types.ChatIdWithChannelDirectMessageThreadId -public inline fun EncryptedPassportElement.ifIdentityCard(block: (IdentityCard) -> T): T? = identityCardOrNull() ?.let(block) +public inline fun ChatIdentifier.ifChatIdWithChannelDirectMessageThreadId(block: (ChatIdWithChannelDirectMessageThreadId) -> T): T? = chatIdWithChannelDirectMessageThreadIdOrNull() ?.let(block) -public inline fun EncryptedPassportElement.encryptedPassportElementWithFrontSideOrNull(): EncryptedPassportElementWithFrontSide? = this as? dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithFrontSide +public inline fun ChatIdentifier.businessChatIdOrNull(): BusinessChatId? = this as? dev.inmo.tgbotapi.types.BusinessChatId -public inline fun EncryptedPassportElement.encryptedPassportElementWithFrontSideOrThrow(): EncryptedPassportElementWithFrontSide = this as dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithFrontSide +public inline fun ChatIdentifier.businessChatIdOrThrow(): BusinessChatId = this as dev.inmo.tgbotapi.types.BusinessChatId -public inline fun EncryptedPassportElement.ifEncryptedPassportElementWithFrontSide(block: (EncryptedPassportElementWithFrontSide) -> T): T? = encryptedPassportElementWithFrontSideOrNull() ?.let(block) +public inline fun ChatIdentifier.ifBusinessChatId(block: (BusinessChatId) -> T): T? = businessChatIdOrNull() ?.let(block) -public inline fun EncryptedPassportElement.encryptedPassportElementWithReverseSideOrNull(): EncryptedPassportElementWithReverseSide? = this as? dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithReverseSide +public inline fun ChatIdentifier.usernameOrNull(): Username? = this as? dev.inmo.tgbotapi.types.Username -public inline fun EncryptedPassportElement.encryptedPassportElementWithReverseSideOrThrow(): EncryptedPassportElementWithReverseSide = this as dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithReverseSide +public inline fun ChatIdentifier.usernameOrThrow(): Username = this as dev.inmo.tgbotapi.types.Username -public inline fun EncryptedPassportElement.ifEncryptedPassportElementWithReverseSide(block: (EncryptedPassportElementWithReverseSide) -> T): T? = encryptedPassportElementWithReverseSideOrNull() ?.let(block) +public inline fun ChatIdentifier.ifUsername(block: (Username) -> T): T? = usernameOrNull() ?.let(block) -public inline fun EncryptedPassportElement.encryptedPassportElementWithDataOrNull(): EncryptedPassportElementWithData? = this as? dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithData +public inline fun InlineQueryResult.withCustomizableCaptionInlineQueryResultOrNull(): WithCustomizableCaptionInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.WithCustomizableCaptionInlineQueryResult -public inline fun EncryptedPassportElement.encryptedPassportElementWithDataOrThrow(): EncryptedPassportElementWithData = this as dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithData +public inline fun InlineQueryResult.withCustomizableCaptionInlineQueryResultOrThrow(): WithCustomizableCaptionInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.WithCustomizableCaptionInlineQueryResult -public inline fun EncryptedPassportElement.ifEncryptedPassportElementWithData(block: (EncryptedPassportElementWithData) -> T): T? = encryptedPassportElementWithDataOrNull() ?.let(block) +public inline fun InlineQueryResult.ifWithCustomizableCaptionInlineQueryResult(block: (WithCustomizableCaptionInlineQueryResult) -> T): T? = withCustomizableCaptionInlineQueryResultOrNull() ?.let(block) -public inline fun EncryptedPassportElement.encryptedPassportElementWithSelfieOrNull(): EncryptedPassportElementWithSelfie? = this as? dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithSelfie +public inline fun InlineQueryResult.titledInlineQueryResultOrNull(): TitledInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.TitledInlineQueryResult -public inline fun EncryptedPassportElement.encryptedPassportElementWithSelfieOrThrow(): EncryptedPassportElementWithSelfie = this as dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithSelfie +public inline fun InlineQueryResult.titledInlineQueryResultOrThrow(): TitledInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.TitledInlineQueryResult -public inline fun EncryptedPassportElement.ifEncryptedPassportElementWithSelfie(block: (EncryptedPassportElementWithSelfie) -> T): T? = encryptedPassportElementWithSelfieOrNull() ?.let(block) +public inline fun InlineQueryResult.ifTitledInlineQueryResult(block: (TitledInlineQueryResult) -> T): T? = titledInlineQueryResultOrNull() ?.let(block) -public inline fun EncryptedPassportElement.unknownEncryptedPassportElementOrNull(): UnknownEncryptedPassportElement? = this as? dev.inmo.tgbotapi.types.passport.encrypted.abstracts.UnknownEncryptedPassportElement +public inline fun InlineQueryResult.urlInlineQueryResultOrNull(): UrlInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.UrlInlineQueryResult -public inline fun EncryptedPassportElement.unknownEncryptedPassportElementOrThrow(): UnknownEncryptedPassportElement = this as dev.inmo.tgbotapi.types.passport.encrypted.abstracts.UnknownEncryptedPassportElement +public inline fun InlineQueryResult.urlInlineQueryResultOrThrow(): UrlInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.UrlInlineQueryResult -public inline fun EncryptedPassportElement.ifUnknownEncryptedPassportElement(block: (UnknownEncryptedPassportElement) -> T): T? = unknownEncryptedPassportElementOrNull() ?.let(block) +public inline fun InlineQueryResult.ifUrlInlineQueryResult(block: (UrlInlineQueryResult) -> T): T? = urlInlineQueryResultOrNull() ?.let(block) -public inline fun EncryptedPassportElement.encryptedPassportElementWithPhoneNumberOrNull(): EncryptedPassportElementWithPhoneNumber? = this as? dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithPhoneNumber +public inline fun InlineQueryResult.withInputMessageContentInlineQueryResultOrNull(): WithInputMessageContentInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.WithInputMessageContentInlineQueryResult -public inline fun EncryptedPassportElement.encryptedPassportElementWithPhoneNumberOrThrow(): EncryptedPassportElementWithPhoneNumber = this as dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithPhoneNumber +public inline fun InlineQueryResult.withInputMessageContentInlineQueryResultOrThrow(): WithInputMessageContentInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.WithInputMessageContentInlineQueryResult -public inline fun EncryptedPassportElement.ifEncryptedPassportElementWithPhoneNumber(block: (EncryptedPassportElementWithPhoneNumber) -> T): T? = encryptedPassportElementWithPhoneNumberOrNull() ?.let(block) +public inline fun InlineQueryResult.ifWithInputMessageContentInlineQueryResult(block: (WithInputMessageContentInlineQueryResult) -> T): T? = withInputMessageContentInlineQueryResultOrNull() ?.let(block) -public inline fun EncryptedPassportElement.encryptedPassportElementTranslatableOrNull(): EncryptedPassportElementTranslatable? = this as? dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementTranslatable +public inline fun InlineQueryResult.optionallyTitledInlineQueryResultOrNull(): OptionallyTitledInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.OptionallyTitledInlineQueryResult -public inline fun EncryptedPassportElement.encryptedPassportElementTranslatableOrThrow(): EncryptedPassportElementTranslatable = this as dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementTranslatable +public inline fun InlineQueryResult.optionallyTitledInlineQueryResultOrThrow(): OptionallyTitledInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.OptionallyTitledInlineQueryResult -public inline fun EncryptedPassportElement.ifEncryptedPassportElementTranslatable(block: (EncryptedPassportElementTranslatable) -> T): T? = encryptedPassportElementTranslatableOrNull() ?.let(block) +public inline fun InlineQueryResult.ifOptionallyTitledInlineQueryResult(block: (OptionallyTitledInlineQueryResult) -> T): T? = optionallyTitledInlineQueryResultOrNull() ?.let(block) -public inline fun EncryptedPassportElement.encryptedPassportElementWithFilesCollectionOrNull(): EncryptedPassportElementWithFilesCollection? = this as? dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithFilesCollection +public inline fun InlineQueryResult.inlineQueryResultVoiceCachedOrNull(): InlineQueryResultVoiceCached? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.InlineQueryResultVoiceCached -public inline fun EncryptedPassportElement.encryptedPassportElementWithFilesCollectionOrThrow(): EncryptedPassportElementWithFilesCollection = this as dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithFilesCollection +public inline fun InlineQueryResult.inlineQueryResultVoiceCachedOrThrow(): InlineQueryResultVoiceCached = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.InlineQueryResultVoiceCached -public inline fun EncryptedPassportElement.ifEncryptedPassportElementWithFilesCollection(block: (EncryptedPassportElementWithFilesCollection) -> T): T? = encryptedPassportElementWithFilesCollectionOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultVoiceCached(block: (InlineQueryResultVoiceCached) -> T): T? = inlineQueryResultVoiceCachedOrNull() ?.let(block) -public inline fun EncryptedPassportElement.encryptedPassportElementWithEmailOrNull(): EncryptedPassportElementWithEmail? = this as? dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithEmail +public inline fun InlineQueryResult.inlineQueryResultVoiceOrNull(): InlineQueryResultVoice? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.InlineQueryResultVoice -public inline fun EncryptedPassportElement.encryptedPassportElementWithEmailOrThrow(): EncryptedPassportElementWithEmail = this as dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithEmail +public inline fun InlineQueryResult.inlineQueryResultVoiceOrThrow(): InlineQueryResultVoice = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.InlineQueryResultVoice -public inline fun EncryptedPassportElement.ifEncryptedPassportElementWithEmail(block: (EncryptedPassportElementWithEmail) -> T): T? = encryptedPassportElementWithEmailOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultVoice(block: (InlineQueryResultVoice) -> T): T? = inlineQueryResultVoiceOrNull() ?.let(block) -public inline fun EncryptedPassportElement.encryptedPersonalDetailsOrNull(): EncryptedPersonalDetails? = this as? dev.inmo.tgbotapi.types.passport.encrypted.EncryptedPersonalDetails +public inline fun InlineQueryResult.inlineQueryResultVoiceCommonOrNull(): InlineQueryResultVoiceCommon? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.InlineQueryResultVoiceCommon -public inline fun EncryptedPassportElement.encryptedPersonalDetailsOrThrow(): EncryptedPersonalDetails = this as dev.inmo.tgbotapi.types.passport.encrypted.EncryptedPersonalDetails +public inline fun InlineQueryResult.inlineQueryResultVoiceCommonOrThrow(): InlineQueryResultVoiceCommon = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.InlineQueryResultVoiceCommon -public inline fun EncryptedPassportElement.ifEncryptedPersonalDetails(block: (EncryptedPersonalDetails) -> T): T? = encryptedPersonalDetailsOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultVoiceCommon(block: (InlineQueryResultVoiceCommon) -> T): T? = inlineQueryResultVoiceCommonOrNull() ?.let(block) -public inline fun SecureValue.personalDetailsSecureValueOrNull(): PersonalDetailsSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.PersonalDetailsSecureValue +public inline fun InlineQueryResult.inlineQueryResultDocumentCachedOrNull(): InlineQueryResultDocumentCached? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.document.InlineQueryResultDocumentCached -public inline fun SecureValue.personalDetailsSecureValueOrThrow(): PersonalDetailsSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.PersonalDetailsSecureValue +public inline fun InlineQueryResult.inlineQueryResultDocumentCachedOrThrow(): InlineQueryResultDocumentCached = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.document.InlineQueryResultDocumentCached -public inline fun SecureValue.ifPersonalDetailsSecureValue(block: (PersonalDetailsSecureValue) -> T): T? = personalDetailsSecureValueOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultDocumentCached(block: (InlineQueryResultDocumentCached) -> T): T? = inlineQueryResultDocumentCachedOrNull() ?.let(block) -public inline fun SecureValue.otherDocumentsSecureValueOrNull(): OtherDocumentsSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.OtherDocumentsSecureValue +public inline fun InlineQueryResult.inlineQueryResultDocumentOrNull(): InlineQueryResultDocument? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.document.InlineQueryResultDocument -public inline fun SecureValue.otherDocumentsSecureValueOrThrow(): OtherDocumentsSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.OtherDocumentsSecureValue +public inline fun InlineQueryResult.inlineQueryResultDocumentOrThrow(): InlineQueryResultDocument = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.document.InlineQueryResultDocument -public inline fun SecureValue.ifOtherDocumentsSecureValue(block: (OtherDocumentsSecureValue) -> T): T? = otherDocumentsSecureValueOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultDocument(block: (InlineQueryResultDocument) -> T): T? = inlineQueryResultDocumentOrNull() ?.let(block) -public inline fun SecureValue.utilityBillSecureValueOrNull(): UtilityBillSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.UtilityBillSecureValue +public inline fun InlineQueryResult.inlineQueryResultDocumentCommonOrNull(): InlineQueryResultDocumentCommon? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.document.InlineQueryResultDocumentCommon -public inline fun SecureValue.utilityBillSecureValueOrThrow(): UtilityBillSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.UtilityBillSecureValue +public inline fun InlineQueryResult.inlineQueryResultDocumentCommonOrThrow(): InlineQueryResultDocumentCommon = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.document.InlineQueryResultDocumentCommon -public inline fun SecureValue.ifUtilityBillSecureValue(block: (UtilityBillSecureValue) -> T): T? = utilityBillSecureValueOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultDocumentCommon(block: (InlineQueryResultDocumentCommon) -> T): T? = inlineQueryResultDocumentCommonOrNull() ?.let(block) -public inline fun SecureValue.bankStatementSecureValueOrNull(): BankStatementSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.BankStatementSecureValue +public inline fun InlineQueryResult.inlineQueryResultPhotoCachedOrNull(): InlineQueryResultPhotoCached? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.photo.InlineQueryResultPhotoCached -public inline fun SecureValue.bankStatementSecureValueOrThrow(): BankStatementSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.BankStatementSecureValue +public inline fun InlineQueryResult.inlineQueryResultPhotoCachedOrThrow(): InlineQueryResultPhotoCached = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.photo.InlineQueryResultPhotoCached -public inline fun SecureValue.ifBankStatementSecureValue(block: (BankStatementSecureValue) -> T): T? = bankStatementSecureValueOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultPhotoCached(block: (InlineQueryResultPhotoCached) -> T): T? = inlineQueryResultPhotoCachedOrNull() ?.let(block) -public inline fun SecureValue.rentalAgreementSecureValueOrNull(): RentalAgreementSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.RentalAgreementSecureValue +public inline fun InlineQueryResult.inlineQueryResultPhotoCommonOrNull(): InlineQueryResultPhotoCommon? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.photo.InlineQueryResultPhotoCommon -public inline fun SecureValue.rentalAgreementSecureValueOrThrow(): RentalAgreementSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.RentalAgreementSecureValue +public inline fun InlineQueryResult.inlineQueryResultPhotoCommonOrThrow(): InlineQueryResultPhotoCommon = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.photo.InlineQueryResultPhotoCommon -public inline fun SecureValue.ifRentalAgreementSecureValue(block: (RentalAgreementSecureValue) -> T): T? = rentalAgreementSecureValueOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultPhotoCommon(block: (InlineQueryResultPhotoCommon) -> T): T? = inlineQueryResultPhotoCommonOrNull() ?.let(block) -public inline fun SecureValue.passportRegistrationSecureValueOrNull(): PassportRegistrationSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.PassportRegistrationSecureValue +public inline fun InlineQueryResult.inlineQueryResultPhotoOrNull(): InlineQueryResultPhoto? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.photo.InlineQueryResultPhoto -public inline fun SecureValue.passportRegistrationSecureValueOrThrow(): PassportRegistrationSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.PassportRegistrationSecureValue +public inline fun InlineQueryResult.inlineQueryResultPhotoOrThrow(): InlineQueryResultPhoto = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.photo.InlineQueryResultPhoto -public inline fun SecureValue.ifPassportRegistrationSecureValue(block: (PassportRegistrationSecureValue) -> T): T? = passportRegistrationSecureValueOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultPhoto(block: (InlineQueryResultPhoto) -> T): T? = inlineQueryResultPhotoOrNull() ?.let(block) -public inline fun SecureValue.temporalRegistrationSecureValueOrNull(): TemporalRegistrationSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.TemporalRegistrationSecureValue +public inline fun InlineQueryResult.inlineQueryResultGifCachedOrNull(): InlineQueryResultGifCached? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGifCached -public inline fun SecureValue.temporalRegistrationSecureValueOrThrow(): TemporalRegistrationSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.TemporalRegistrationSecureValue +public inline fun InlineQueryResult.inlineQueryResultGifCachedOrThrow(): InlineQueryResultGifCached = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGifCached -public inline fun SecureValue.ifTemporalRegistrationSecureValue(block: (TemporalRegistrationSecureValue) -> T): T? = temporalRegistrationSecureValueOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultGifCached(block: (InlineQueryResultGifCached) -> T): T? = inlineQueryResultGifCachedOrNull() ?.let(block) -public inline fun SecureValue.passportSecureValueOrNull(): PassportSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.PassportSecureValue +public inline fun InlineQueryResult.inlineQueryResultGifOrNull(): InlineQueryResultGif? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGif -public inline fun SecureValue.passportSecureValueOrThrow(): PassportSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.PassportSecureValue +public inline fun InlineQueryResult.inlineQueryResultGifOrThrow(): InlineQueryResultGif = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGif -public inline fun SecureValue.ifPassportSecureValue(block: (PassportSecureValue) -> T): T? = passportSecureValueOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultGif(block: (InlineQueryResultGif) -> T): T? = inlineQueryResultGifOrNull() ?.let(block) -public inline fun SecureValue.commonPassportSecureValueOrNull(): CommonPassportSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.CommonPassportSecureValue +public inline fun InlineQueryResult.inlineQueryResultGifCommonOrNull(): InlineQueryResultGifCommon? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGifCommon -public inline fun SecureValue.commonPassportSecureValueOrThrow(): CommonPassportSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.CommonPassportSecureValue +public inline fun InlineQueryResult.inlineQueryResultGifCommonOrThrow(): InlineQueryResultGifCommon = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGifCommon -public inline fun SecureValue.ifCommonPassportSecureValue(block: (CommonPassportSecureValue) -> T): T? = commonPassportSecureValueOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultGifCommon(block: (InlineQueryResultGifCommon) -> T): T? = inlineQueryResultGifCommonOrNull() ?.let(block) -public inline fun SecureValue.internalPassportSecureValueOrNull(): InternalPassportSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.InternalPassportSecureValue +public inline fun InlineQueryResult.inlineQueryResultVideoOrNull(): InlineQueryResultVideo? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.InlineQueryResultVideo -public inline fun SecureValue.internalPassportSecureValueOrThrow(): InternalPassportSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.InternalPassportSecureValue +public inline fun InlineQueryResult.inlineQueryResultVideoOrThrow(): InlineQueryResultVideo = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.InlineQueryResultVideo -public inline fun SecureValue.ifInternalPassportSecureValue(block: (InternalPassportSecureValue) -> T): T? = internalPassportSecureValueOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultVideo(block: (InlineQueryResultVideo) -> T): T? = inlineQueryResultVideoOrNull() ?.let(block) -public inline fun SecureValue.secureValueWithFilesOrNull(): SecureValueWithFiles? = this as? dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithFiles +public inline fun InlineQueryResult.inlineQueryResultVideoCommonOrNull(): InlineQueryResultVideoCommon? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.InlineQueryResultVideoCommon -public inline fun SecureValue.secureValueWithFilesOrThrow(): SecureValueWithFiles = this as dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithFiles +public inline fun InlineQueryResult.inlineQueryResultVideoCommonOrThrow(): InlineQueryResultVideoCommon = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.InlineQueryResultVideoCommon -public inline fun SecureValue.ifSecureValueWithFiles(block: (SecureValueWithFiles) -> T): T? = secureValueWithFilesOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultVideoCommon(block: (InlineQueryResultVideoCommon) -> T): T? = inlineQueryResultVideoCommonOrNull() ?.let(block) -public inline fun SecureValue.secureValueWithReverseSideOrNull(): SecureValueWithReverseSide? = this as? dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithReverseSide +public inline fun InlineQueryResult.inlineQueryResultVideoCachedOrNull(): InlineQueryResultVideoCached? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.InlineQueryResultVideoCached -public inline fun SecureValue.secureValueWithReverseSideOrThrow(): SecureValueWithReverseSide = this as dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithReverseSide +public inline fun InlineQueryResult.inlineQueryResultVideoCachedOrThrow(): InlineQueryResultVideoCached = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.InlineQueryResultVideoCached -public inline fun SecureValue.ifSecureValueWithReverseSide(block: (SecureValueWithReverseSide) -> T): T? = secureValueWithReverseSideOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultVideoCached(block: (InlineQueryResultVideoCached) -> T): T? = inlineQueryResultVideoCachedOrNull() ?.let(block) -public inline fun SecureValue.secureValueWithTranslationsOrNull(): SecureValueWithTranslations? = this as? dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithTranslations +public inline fun InlineQueryResult.inlineQueryResultAudioCachedOrNull(): InlineQueryResultAudioCached? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.audio.InlineQueryResultAudioCached -public inline fun SecureValue.secureValueWithTranslationsOrThrow(): SecureValueWithTranslations = this as dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithTranslations +public inline fun InlineQueryResult.inlineQueryResultAudioCachedOrThrow(): InlineQueryResultAudioCached = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.audio.InlineQueryResultAudioCached -public inline fun SecureValue.ifSecureValueWithTranslations(block: (SecureValueWithTranslations) -> T): T? = secureValueWithTranslationsOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultAudioCached(block: (InlineQueryResultAudioCached) -> T): T? = inlineQueryResultAudioCachedOrNull() ?.let(block) -public inline fun SecureValue.secureValueWithDataOrNull(): SecureValueWithData? = this as? dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithData +public inline fun InlineQueryResult.inlineQueryResultAudioCommonOrNull(): InlineQueryResultAudioCommon? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.audio.InlineQueryResultAudioCommon -public inline fun SecureValue.secureValueWithDataOrThrow(): SecureValueWithData = this as dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithData +public inline fun InlineQueryResult.inlineQueryResultAudioCommonOrThrow(): InlineQueryResultAudioCommon = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.audio.InlineQueryResultAudioCommon -public inline fun SecureValue.ifSecureValueWithData(block: (SecureValueWithData) -> T): T? = secureValueWithDataOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultAudioCommon(block: (InlineQueryResultAudioCommon) -> T): T? = inlineQueryResultAudioCommonOrNull() ?.let(block) -public inline fun SecureValue.secureValueIdentityOrNull(): SecureValueIdentity? = this as? dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueIdentity +public inline fun InlineQueryResult.inlineQueryResultAudioOrNull(): InlineQueryResultAudio? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.audio.InlineQueryResultAudio -public inline fun SecureValue.secureValueIdentityOrThrow(): SecureValueIdentity = this as dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueIdentity +public inline fun InlineQueryResult.inlineQueryResultAudioOrThrow(): InlineQueryResultAudio = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.audio.InlineQueryResultAudio -public inline fun SecureValue.ifSecureValueIdentity(block: (SecureValueIdentity) -> T): T? = secureValueIdentityOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultAudio(block: (InlineQueryResultAudio) -> T): T? = inlineQueryResultAudioOrNull() ?.let(block) -public inline fun SecureValue.identityWithReverseSideSecureValueOrNull(): IdentityWithReverseSideSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.IdentityWithReverseSideSecureValue +public inline fun InlineQueryResult.inlineQueryResultMpeg4GifCommonOrNull(): InlineQueryResultMpeg4GifCommon? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif.InlineQueryResultMpeg4GifCommon -public inline fun SecureValue.identityWithReverseSideSecureValueOrThrow(): IdentityWithReverseSideSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.IdentityWithReverseSideSecureValue +public inline fun InlineQueryResult.inlineQueryResultMpeg4GifCommonOrThrow(): InlineQueryResultMpeg4GifCommon = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif.InlineQueryResultMpeg4GifCommon -public inline fun SecureValue.ifIdentityWithReverseSideSecureValue(block: (IdentityWithReverseSideSecureValue) -> T): T? = identityWithReverseSideSecureValueOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultMpeg4GifCommon(block: (InlineQueryResultMpeg4GifCommon) -> T): T? = inlineQueryResultMpeg4GifCommonOrNull() ?.let(block) -public inline fun SecureValue.driverLicenseSecureValueOrNull(): DriverLicenseSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.DriverLicenseSecureValue +public inline fun InlineQueryResult.inlineQueryResultMpeg4GifCachedOrNull(): InlineQueryResultMpeg4GifCached? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif.InlineQueryResultMpeg4GifCached -public inline fun SecureValue.driverLicenseSecureValueOrThrow(): DriverLicenseSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.DriverLicenseSecureValue +public inline fun InlineQueryResult.inlineQueryResultMpeg4GifCachedOrThrow(): InlineQueryResultMpeg4GifCached = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif.InlineQueryResultMpeg4GifCached -public inline fun SecureValue.ifDriverLicenseSecureValue(block: (DriverLicenseSecureValue) -> T): T? = driverLicenseSecureValueOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultMpeg4GifCached(block: (InlineQueryResultMpeg4GifCached) -> T): T? = inlineQueryResultMpeg4GifCachedOrNull() ?.let(block) -public inline fun SecureValue.identityCardSecureValueOrNull(): IdentityCardSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.IdentityCardSecureValue +public inline fun InlineQueryResult.inlineQueryResultMpeg4GifOrNull(): InlineQueryResultMpeg4Gif? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif.InlineQueryResultMpeg4Gif -public inline fun SecureValue.identityCardSecureValueOrThrow(): IdentityCardSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.IdentityCardSecureValue +public inline fun InlineQueryResult.inlineQueryResultMpeg4GifOrThrow(): InlineQueryResultMpeg4Gif = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif.InlineQueryResultMpeg4Gif -public inline fun SecureValue.ifIdentityCardSecureValue(block: (IdentityCardSecureValue) -> T): T? = identityCardSecureValueOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultMpeg4Gif(block: (InlineQueryResultMpeg4Gif) -> T): T? = inlineQueryResultMpeg4GifOrNull() ?.let(block) -public inline fun SecureValue.addressSecureValueOrNull(): AddressSecureValue? = this as? dev.inmo.tgbotapi.types.passport.decrypted.AddressSecureValue +public inline fun InlineQueryResult.thumbSizedInlineQueryResultOrNull(): ThumbSizedInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.ThumbSizedInlineQueryResult -public inline fun SecureValue.addressSecureValueOrThrow(): AddressSecureValue = this as dev.inmo.tgbotapi.types.passport.decrypted.AddressSecureValue +public inline fun InlineQueryResult.thumbSizedInlineQueryResultOrThrow(): ThumbSizedInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.ThumbSizedInlineQueryResult -public inline fun SecureValue.ifAddressSecureValue(block: (AddressSecureValue) -> T): T? = addressSecureValueOrNull() ?.let(block) +public inline fun InlineQueryResult.ifThumbSizedInlineQueryResult(block: (ThumbSizedInlineQueryResult) -> T): T? = thumbSizedInlineQueryResultOrNull() ?.let(block) -public inline fun ChatMessageReactionUpdated.byUserOrNull(): ChatMessageReactionUpdated.ByUser? = this as? dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated.ByUser +public inline fun InlineQueryResult.describedInlineQueryResultOrNull(): DescribedInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.DescribedInlineQueryResult -public inline fun ChatMessageReactionUpdated.byUserOrThrow(): ChatMessageReactionUpdated.ByUser = this as dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated.ByUser +public inline fun InlineQueryResult.describedInlineQueryResultOrThrow(): DescribedInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.DescribedInlineQueryResult -public inline fun ChatMessageReactionUpdated.ifByUser(block: (ChatMessageReactionUpdated.ByUser) -> T): T? = byUserOrNull() ?.let(block) +public inline fun InlineQueryResult.ifDescribedInlineQueryResult(block: (DescribedInlineQueryResult) -> T): T? = describedInlineQueryResultOrNull() ?.let(block) -public inline fun ChatMessageReactionUpdated.byChatOrNull(): ChatMessageReactionUpdated.ByChat? = this as? dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated.ByChat +public inline fun InlineQueryResult.thumbedInlineQueryResultOrNull(): ThumbedInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.ThumbedInlineQueryResult -public inline fun ChatMessageReactionUpdated.byChatOrThrow(): ChatMessageReactionUpdated.ByChat = this as dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated.ByChat +public inline fun InlineQueryResult.thumbedInlineQueryResultOrThrow(): ThumbedInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.ThumbedInlineQueryResult -public inline fun ChatMessageReactionUpdated.ifByChat(block: (ChatMessageReactionUpdated.ByChat) -> T): T? = byChatOrNull() ?.let(block) +public inline fun InlineQueryResult.ifThumbedInlineQueryResult(block: (ThumbedInlineQueryResult) -> T): T? = thumbedInlineQueryResultOrNull() ?.let(block) -public inline fun ChatMessageReactionUpdated.unknownOrNull(): ChatMessageReactionUpdated.Unknown? = this as? dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated.Unknown +public inline fun InlineQueryResult.thumbedWithMimeTypeInlineQueryResultOrNull(): ThumbedWithMimeTypeInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.ThumbedWithMimeTypeInlineQueryResult -public inline fun ChatMessageReactionUpdated.unknownOrThrow(): ChatMessageReactionUpdated.Unknown = this as dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated.Unknown +public inline fun InlineQueryResult.thumbedWithMimeTypeInlineQueryResultOrThrow(): ThumbedWithMimeTypeInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.ThumbedWithMimeTypeInlineQueryResult -public inline fun ChatMessageReactionUpdated.ifUnknown(block: (ChatMessageReactionUpdated.Unknown) -> T): T? = unknownOrNull() ?.let(block) +public inline fun InlineQueryResult.ifThumbedWithMimeTypeInlineQueryResult(block: (ThumbedWithMimeTypeInlineQueryResult) -> T): T? = thumbedWithMimeTypeInlineQueryResultOrNull() ?.let(block) -public inline fun Chat.extendedBotOrNull(): ExtendedBot? = this as? dev.inmo.tgbotapi.types.chat.ExtendedBot +public inline fun InlineQueryResult.sizedInlineQueryResultOrNull(): SizedInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.SizedInlineQueryResult -public inline fun Chat.extendedBotOrThrow(): ExtendedBot = this as dev.inmo.tgbotapi.types.chat.ExtendedBot +public inline fun InlineQueryResult.sizedInlineQueryResultOrThrow(): SizedInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.SizedInlineQueryResult -public inline fun Chat.ifExtendedBot(block: (ExtendedBot) -> T): T? = extendedBotOrNull() ?.let(block) +public inline fun InlineQueryResult.ifSizedInlineQueryResult(block: (SizedInlineQueryResult) -> T): T? = sizedInlineQueryResultOrNull() ?.let(block) -public inline fun Chat.unknownExtendedChatOrNull(): UnknownExtendedChat? = this as? dev.inmo.tgbotapi.types.chat.UnknownExtendedChat +public inline fun InlineQueryResult.fileInlineQueryResultOrNull(): FileInlineQueryResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.FileInlineQueryResult -public inline fun Chat.unknownExtendedChatOrThrow(): UnknownExtendedChat = this as dev.inmo.tgbotapi.types.chat.UnknownExtendedChat +public inline fun InlineQueryResult.fileInlineQueryResultOrThrow(): FileInlineQueryResult = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.FileInlineQueryResult -public inline fun Chat.ifUnknownExtendedChat(block: (UnknownExtendedChat) -> T): T? = unknownExtendedChatOrNull() ?.let(block) +public inline fun InlineQueryResult.ifFileInlineQueryResult(block: (FileInlineQueryResult) -> T): T? = fileInlineQueryResultOrNull() ?.let(block) -public inline fun Chat.unknownChatTypeOrNull(): UnknownChatType? = this as? dev.inmo.tgbotapi.types.chat.UnknownChatType +public inline fun InlineQueryResult.inlineQueryResultArticleOrNull(): InlineQueryResultArticle? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultArticle -public inline fun Chat.unknownChatTypeOrThrow(): UnknownChatType = this as dev.inmo.tgbotapi.types.chat.UnknownChatType +public inline fun InlineQueryResult.inlineQueryResultArticleOrThrow(): InlineQueryResultArticle = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultArticle -public inline fun Chat.ifUnknownChatType(block: (UnknownChatType) -> T): T? = unknownChatTypeOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultArticle(block: (InlineQueryResultArticle) -> T): T? = inlineQueryResultArticleOrNull() ?.let(block) -public inline fun Chat.previewChatOrNull(): PreviewChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewChat +public inline fun InlineQueryResult.inlineQueryResultVenueOrNull(): InlineQueryResultVenue? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultVenue -public inline fun Chat.previewChatOrThrow(): PreviewChat = this as dev.inmo.tgbotapi.types.chat.PreviewChat +public inline fun InlineQueryResult.inlineQueryResultVenueOrThrow(): InlineQueryResultVenue = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultVenue -public inline fun Chat.ifPreviewChat(block: (PreviewChat) -> T): T? = previewChatOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultVenue(block: (InlineQueryResultVenue) -> T): T? = inlineQueryResultVenueOrNull() ?.let(block) -public inline fun Chat.previewUsernameChatOrNull(): PreviewUsernameChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewUsernameChat +public inline fun InlineQueryResult.inlineQueryResultLocationOrNull(): InlineQueryResultLocation? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultLocation -public inline fun Chat.previewUsernameChatOrThrow(): PreviewUsernameChat = this as dev.inmo.tgbotapi.types.chat.PreviewUsernameChat +public inline fun InlineQueryResult.inlineQueryResultLocationOrThrow(): InlineQueryResultLocation = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultLocation -public inline fun Chat.ifPreviewUsernameChat(block: (PreviewUsernameChat) -> T): T? = previewUsernameChatOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultLocation(block: (InlineQueryResultLocation) -> T): T? = inlineQueryResultLocationOrNull() ?.let(block) -public inline fun Chat.previewPrivateChatOrNull(): PreviewPrivateChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewPrivateChat +public inline fun InlineQueryResult.inlineQueryResultContactOrNull(): InlineQueryResultContact? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultContact -public inline fun Chat.previewPrivateChatOrThrow(): PreviewPrivateChat = this as dev.inmo.tgbotapi.types.chat.PreviewPrivateChat +public inline fun InlineQueryResult.inlineQueryResultContactOrThrow(): InlineQueryResultContact = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultContact -public inline fun Chat.ifPreviewPrivateChat(block: (PreviewPrivateChat) -> T): T? = previewPrivateChatOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultContact(block: (InlineQueryResultContact) -> T): T? = inlineQueryResultContactOrNull() ?.let(block) -public inline fun Chat.previewPrivateForumChatOrNull(): PreviewPrivateForumChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewPrivateForumChat +public inline fun InlineQueryResult.inlineQueryResultStickerCachedOrNull(): InlineQueryResultStickerCached? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultStickerCached -public inline fun Chat.previewPrivateForumChatOrThrow(): PreviewPrivateForumChat = this as dev.inmo.tgbotapi.types.chat.PreviewPrivateForumChat +public inline fun InlineQueryResult.inlineQueryResultStickerCachedOrThrow(): InlineQueryResultStickerCached = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultStickerCached -public inline fun Chat.ifPreviewPrivateForumChat(block: (PreviewPrivateForumChat) -> T): T? = previewPrivateForumChatOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultStickerCached(block: (InlineQueryResultStickerCached) -> T): T? = inlineQueryResultStickerCachedOrNull() ?.let(block) -public inline fun Chat.previewBusinessChatOrNull(): PreviewBusinessChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewBusinessChat +public inline fun InlineQueryResult.inlineQueryResultGameOrNull(): InlineQueryResultGame? = this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultGame -public inline fun Chat.previewBusinessChatOrThrow(): PreviewBusinessChat = this as dev.inmo.tgbotapi.types.chat.PreviewBusinessChat +public inline fun InlineQueryResult.inlineQueryResultGameOrThrow(): InlineQueryResultGame = this as dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultGame -public inline fun Chat.ifPreviewBusinessChat(block: (PreviewBusinessChat) -> T): T? = previewBusinessChatOrNull() ?.let(block) +public inline fun InlineQueryResult.ifInlineQueryResultGame(block: (InlineQueryResultGame) -> T): T? = inlineQueryResultGameOrNull() ?.let(block) -public inline fun Chat.previewPublicChatOrNull(): PreviewPublicChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewPublicChat +public inline fun InputMessageContent.inputContactMessageContentOrNull(): InputContactMessageContent? = this as? dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputContactMessageContent -public inline fun Chat.previewPublicChatOrThrow(): PreviewPublicChat = this as dev.inmo.tgbotapi.types.chat.PreviewPublicChat +public inline fun InputMessageContent.inputContactMessageContentOrThrow(): InputContactMessageContent = this as dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputContactMessageContent -public inline fun Chat.ifPreviewPublicChat(block: (PreviewPublicChat) -> T): T? = previewPublicChatOrNull() ?.let(block) +public inline fun InputMessageContent.ifInputContactMessageContent(block: (InputContactMessageContent) -> T): T? = inputContactMessageContentOrNull() ?.let(block) -public inline fun Chat.previewSuperPublicChatOrNull(): PreviewSuperPublicChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewSuperPublicChat +public inline fun InputMessageContent.inputLocationMessageContentOrNull(): InputLocationMessageContent? = this as? dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputLocationMessageContent -public inline fun Chat.previewSuperPublicChatOrThrow(): PreviewSuperPublicChat = this as dev.inmo.tgbotapi.types.chat.PreviewSuperPublicChat +public inline fun InputMessageContent.inputLocationMessageContentOrThrow(): InputLocationMessageContent = this as dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputLocationMessageContent -public inline fun Chat.ifPreviewSuperPublicChat(block: (PreviewSuperPublicChat) -> T): T? = previewSuperPublicChatOrNull() ?.let(block) +public inline fun InputMessageContent.ifInputLocationMessageContent(block: (InputLocationMessageContent) -> T): T? = inputLocationMessageContentOrNull() ?.let(block) -public inline fun Chat.previewChannelChatOrNull(): PreviewChannelChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewChannelChat +public inline fun InputMessageContent.inputInvoiceMessageContentOrNull(): InputInvoiceMessageContent? = this as? dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputInvoiceMessageContent -public inline fun Chat.previewChannelChatOrThrow(): PreviewChannelChat = this as dev.inmo.tgbotapi.types.chat.PreviewChannelChat +public inline fun InputMessageContent.inputInvoiceMessageContentOrThrow(): InputInvoiceMessageContent = this as dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputInvoiceMessageContent -public inline fun Chat.ifPreviewChannelChat(block: (PreviewChannelChat) -> T): T? = previewChannelChatOrNull() ?.let(block) +public inline fun InputMessageContent.ifInputInvoiceMessageContent(block: (InputInvoiceMessageContent) -> T): T? = inputInvoiceMessageContentOrNull() ?.let(block) -public inline fun Chat.previewGroupChatOrNull(): PreviewGroupChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewGroupChat +public inline fun InputMessageContent.inputTextMessageContentOrNull(): InputTextMessageContent? = this as? dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputTextMessageContent -public inline fun Chat.previewGroupChatOrThrow(): PreviewGroupChat = this as dev.inmo.tgbotapi.types.chat.PreviewGroupChat +public inline fun InputMessageContent.inputTextMessageContentOrThrow(): InputTextMessageContent = this as dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputTextMessageContent -public inline fun Chat.ifPreviewGroupChat(block: (PreviewGroupChat) -> T): T? = previewGroupChatOrNull() ?.let(block) +public inline fun InputMessageContent.ifInputTextMessageContent(block: (InputTextMessageContent) -> T): T? = inputTextMessageContentOrNull() ?.let(block) -public inline fun Chat.previewSupergroupChatOrNull(): PreviewSupergroupChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewSupergroupChat +public inline fun InputMessageContent.inputVenueMessageContentOrNull(): InputVenueMessageContent? = this as? dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputVenueMessageContent -public inline fun Chat.previewSupergroupChatOrThrow(): PreviewSupergroupChat = this as dev.inmo.tgbotapi.types.chat.PreviewSupergroupChat +public inline fun InputMessageContent.inputVenueMessageContentOrThrow(): InputVenueMessageContent = this as dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputVenueMessageContent -public inline fun Chat.ifPreviewSupergroupChat(block: (PreviewSupergroupChat) -> T): T? = previewSupergroupChatOrNull() ?.let(block) +public inline fun InputMessageContent.ifInputVenueMessageContent(block: (InputVenueMessageContent) -> T): T? = inputVenueMessageContentOrNull() ?.let(block) -public inline fun Chat.previewForumChatOrNull(): PreviewForumChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewForumChat +public inline fun BotAction.typingActionOrNull(): TypingAction? = this as? dev.inmo.tgbotapi.types.actions.TypingAction -public inline fun Chat.previewForumChatOrThrow(): PreviewForumChat = this as dev.inmo.tgbotapi.types.chat.PreviewForumChat +public inline fun BotAction.typingActionOrThrow(): TypingAction = this as dev.inmo.tgbotapi.types.actions.TypingAction -public inline fun Chat.ifPreviewForumChat(block: (PreviewForumChat) -> T): T? = previewForumChatOrNull() ?.let(block) +public inline fun BotAction.ifTypingAction(block: (TypingAction) -> T): T? = typingActionOrNull() ?.let(block) -public inline fun Chat.previewChannelDirectMessagesChatOrNull(): PreviewChannelDirectMessagesChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewChannelDirectMessagesChat +public inline fun BotAction.uploadPhotoActionOrNull(): UploadPhotoAction? = this as? dev.inmo.tgbotapi.types.actions.UploadPhotoAction -public inline fun Chat.previewChannelDirectMessagesChatOrThrow(): PreviewChannelDirectMessagesChat = this as dev.inmo.tgbotapi.types.chat.PreviewChannelDirectMessagesChat +public inline fun BotAction.uploadPhotoActionOrThrow(): UploadPhotoAction = this as dev.inmo.tgbotapi.types.actions.UploadPhotoAction -public inline fun Chat.ifPreviewChannelDirectMessagesChat(block: (PreviewChannelDirectMessagesChat) -> T): T? = previewChannelDirectMessagesChatOrNull() ?.let(block) +public inline fun BotAction.ifUploadPhotoAction(block: (UploadPhotoAction) -> T): T? = uploadPhotoActionOrNull() ?.let(block) -public inline fun Chat.extendedChatOrNull(): ExtendedChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedChat +public inline fun BotAction.recordVideoActionOrNull(): RecordVideoAction? = this as? dev.inmo.tgbotapi.types.actions.RecordVideoAction -public inline fun Chat.extendedChatOrThrow(): ExtendedChat = this as dev.inmo.tgbotapi.types.chat.ExtendedChat +public inline fun BotAction.recordVideoActionOrThrow(): RecordVideoAction = this as dev.inmo.tgbotapi.types.actions.RecordVideoAction -public inline fun Chat.ifExtendedChat(block: (ExtendedChat) -> T): T? = extendedChatOrNull() ?.let(block) +public inline fun BotAction.ifRecordVideoAction(block: (RecordVideoAction) -> T): T? = recordVideoActionOrNull() ?.let(block) -public inline fun Chat.extendedNonBotChatOrNull(): ExtendedNonBotChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedNonBotChat +public inline fun BotAction.uploadVideoActionOrNull(): UploadVideoAction? = this as? dev.inmo.tgbotapi.types.actions.UploadVideoAction -public inline fun Chat.extendedNonBotChatOrThrow(): ExtendedNonBotChat = this as dev.inmo.tgbotapi.types.chat.ExtendedNonBotChat +public inline fun BotAction.uploadVideoActionOrThrow(): UploadVideoAction = this as dev.inmo.tgbotapi.types.actions.UploadVideoAction -public inline fun Chat.ifExtendedNonBotChat(block: (ExtendedNonBotChat) -> T): T? = extendedNonBotChatOrNull() ?.let(block) +public inline fun BotAction.ifUploadVideoAction(block: (UploadVideoAction) -> T): T? = uploadVideoActionOrNull() ?.let(block) -public inline fun Chat.extendedChannelChatOrNull(): ExtendedChannelChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedChannelChat +public inline fun BotAction.recordVoiceActionOrNull(): RecordVoiceAction? = this as? dev.inmo.tgbotapi.types.actions.RecordVoiceAction -public inline fun Chat.extendedChannelChatOrThrow(): ExtendedChannelChat = this as dev.inmo.tgbotapi.types.chat.ExtendedChannelChat +public inline fun BotAction.recordVoiceActionOrThrow(): RecordVoiceAction = this as dev.inmo.tgbotapi.types.actions.RecordVoiceAction -public inline fun Chat.ifExtendedChannelChat(block: (ExtendedChannelChat) -> T): T? = extendedChannelChatOrNull() ?.let(block) +public inline fun BotAction.ifRecordVoiceAction(block: (RecordVoiceAction) -> T): T? = recordVoiceActionOrNull() ?.let(block) -public inline fun Chat.extendedGroupChatOrNull(): ExtendedGroupChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedGroupChat +public inline fun BotAction.uploadVoiceActionOrNull(): UploadVoiceAction? = this as? dev.inmo.tgbotapi.types.actions.UploadVoiceAction -public inline fun Chat.extendedGroupChatOrThrow(): ExtendedGroupChat = this as dev.inmo.tgbotapi.types.chat.ExtendedGroupChat +public inline fun BotAction.uploadVoiceActionOrThrow(): UploadVoiceAction = this as dev.inmo.tgbotapi.types.actions.UploadVoiceAction -public inline fun Chat.ifExtendedGroupChat(block: (ExtendedGroupChat) -> T): T? = extendedGroupChatOrNull() ?.let(block) +public inline fun BotAction.ifUploadVoiceAction(block: (UploadVoiceAction) -> T): T? = uploadVoiceActionOrNull() ?.let(block) -public inline fun Chat.extendedPrivateChatOrNull(): ExtendedPrivateChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedPrivateChat +public inline fun BotAction.uploadDocumentActionOrNull(): UploadDocumentAction? = this as? dev.inmo.tgbotapi.types.actions.UploadDocumentAction -public inline fun Chat.extendedPrivateChatOrThrow(): ExtendedPrivateChat = this as dev.inmo.tgbotapi.types.chat.ExtendedPrivateChat +public inline fun BotAction.uploadDocumentActionOrThrow(): UploadDocumentAction = this as dev.inmo.tgbotapi.types.actions.UploadDocumentAction -public inline fun Chat.ifExtendedPrivateChat(block: (ExtendedPrivateChat) -> T): T? = extendedPrivateChatOrNull() ?.let(block) +public inline fun BotAction.ifUploadDocumentAction(block: (UploadDocumentAction) -> T): T? = uploadDocumentActionOrNull() ?.let(block) -public inline fun Chat.extendedPrivateForumChatOrNull(): ExtendedPrivateForumChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedPrivateForumChat +public inline fun BotAction.findLocationActionOrNull(): FindLocationAction? = this as? dev.inmo.tgbotapi.types.actions.FindLocationAction -public inline fun Chat.extendedPrivateForumChatOrThrow(): ExtendedPrivateForumChat = this as dev.inmo.tgbotapi.types.chat.ExtendedPrivateForumChat +public inline fun BotAction.findLocationActionOrThrow(): FindLocationAction = this as dev.inmo.tgbotapi.types.actions.FindLocationAction -public inline fun Chat.ifExtendedPrivateForumChat(block: (ExtendedPrivateForumChat) -> T): T? = extendedPrivateForumChatOrNull() ?.let(block) +public inline fun BotAction.ifFindLocationAction(block: (FindLocationAction) -> T): T? = findLocationActionOrNull() ?.let(block) -public inline fun Chat.extendedPublicChatOrNull(): ExtendedPublicChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedPublicChat +public inline fun BotAction.recordVideoNoteActionOrNull(): RecordVideoNoteAction? = this as? dev.inmo.tgbotapi.types.actions.RecordVideoNoteAction -public inline fun Chat.extendedPublicChatOrThrow(): ExtendedPublicChat = this as dev.inmo.tgbotapi.types.chat.ExtendedPublicChat +public inline fun BotAction.recordVideoNoteActionOrThrow(): RecordVideoNoteAction = this as dev.inmo.tgbotapi.types.actions.RecordVideoNoteAction -public inline fun Chat.ifExtendedPublicChat(block: (ExtendedPublicChat) -> T): T? = extendedPublicChatOrNull() ?.let(block) +public inline fun BotAction.ifRecordVideoNoteAction(block: (RecordVideoNoteAction) -> T): T? = recordVideoNoteActionOrNull() ?.let(block) -public inline fun Chat.extendedSupergroupChatOrNull(): ExtendedSupergroupChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedSupergroupChat +public inline fun BotAction.uploadVideoNoteActionOrNull(): UploadVideoNoteAction? = this as? dev.inmo.tgbotapi.types.actions.UploadVideoNoteAction -public inline fun Chat.extendedSupergroupChatOrThrow(): ExtendedSupergroupChat = this as dev.inmo.tgbotapi.types.chat.ExtendedSupergroupChat +public inline fun BotAction.uploadVideoNoteActionOrThrow(): UploadVideoNoteAction = this as dev.inmo.tgbotapi.types.actions.UploadVideoNoteAction -public inline fun Chat.ifExtendedSupergroupChat(block: (ExtendedSupergroupChat) -> T): T? = extendedSupergroupChatOrNull() ?.let(block) +public inline fun BotAction.ifUploadVideoNoteAction(block: (UploadVideoNoteAction) -> T): T? = uploadVideoNoteActionOrNull() ?.let(block) -public inline fun Chat.extendedForumChatOrNull(): ExtendedForumChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedForumChat +public inline fun BotAction.chooseStickerActionOrNull(): ChooseStickerAction? = this as? dev.inmo.tgbotapi.types.actions.ChooseStickerAction -public inline fun Chat.extendedForumChatOrThrow(): ExtendedForumChat = this as dev.inmo.tgbotapi.types.chat.ExtendedForumChat +public inline fun BotAction.chooseStickerActionOrThrow(): ChooseStickerAction = this as dev.inmo.tgbotapi.types.actions.ChooseStickerAction -public inline fun Chat.ifExtendedForumChat(block: (ExtendedForumChat) -> T): T? = extendedForumChatOrNull() ?.let(block) +public inline fun BotAction.ifChooseStickerAction(block: (ChooseStickerAction) -> T): T? = chooseStickerActionOrNull() ?.let(block) -public inline fun Chat.extendedChannelDirectMessagesChatOrNull(): ExtendedChannelDirectMessagesChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedChannelDirectMessagesChat +public inline fun BotAction.customBotActionOrNull(): CustomBotAction? = this as? dev.inmo.tgbotapi.types.actions.CustomBotAction -public inline fun Chat.extendedChannelDirectMessagesChatOrThrow(): ExtendedChannelDirectMessagesChat = this as dev.inmo.tgbotapi.types.chat.ExtendedChannelDirectMessagesChat +public inline fun BotAction.customBotActionOrThrow(): CustomBotAction = this as dev.inmo.tgbotapi.types.actions.CustomBotAction -public inline fun Chat.ifExtendedChannelDirectMessagesChat(block: (ExtendedChannelDirectMessagesChat) -> T): T? = extendedChannelDirectMessagesChatOrNull() ?.let(block) +public inline fun BotAction.ifCustomBotAction(block: (CustomBotAction) -> T): T? = customBotActionOrNull() ?.let(block) -public inline fun Chat.extendedChatWithUsernameOrNull(): ExtendedChatWithUsername? = this as? dev.inmo.tgbotapi.types.chat.ExtendedChatWithUsername +public inline fun BackgroundFill.solidOrNull(): BackgroundFill.Solid? = this as? dev.inmo.tgbotapi.types.BackgroundFill.Solid -public inline fun Chat.extendedChatWithUsernameOrThrow(): ExtendedChatWithUsername = this as dev.inmo.tgbotapi.types.chat.ExtendedChatWithUsername +public inline fun BackgroundFill.solidOrThrow(): BackgroundFill.Solid = this as dev.inmo.tgbotapi.types.BackgroundFill.Solid -public inline fun Chat.ifExtendedChatWithUsername(block: (ExtendedChatWithUsername) -> T): T? = extendedChatWithUsernameOrNull() ?.let(block) +public inline fun BackgroundFill.ifSolid(block: (BackgroundFill.Solid) -> T): T? = solidOrNull() ?.let(block) -public inline fun Chat.extendedBusinessChatOrNull(): ExtendedBusinessChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedBusinessChat +public inline fun BackgroundFill.gradientOrNull(): BackgroundFill.Gradient? = this as? dev.inmo.tgbotapi.types.BackgroundFill.Gradient -public inline fun Chat.extendedBusinessChatOrThrow(): ExtendedBusinessChat = this as dev.inmo.tgbotapi.types.chat.ExtendedBusinessChat +public inline fun BackgroundFill.gradientOrThrow(): BackgroundFill.Gradient = this as dev.inmo.tgbotapi.types.BackgroundFill.Gradient -public inline fun Chat.ifExtendedBusinessChat(block: (ExtendedBusinessChat) -> T): T? = extendedBusinessChatOrNull() ?.let(block) +public inline fun BackgroundFill.ifGradient(block: (BackgroundFill.Gradient) -> T): T? = gradientOrNull() ?.let(block) + +public inline fun BackgroundFill.freeformGradientOrNull(): BackgroundFill.FreeformGradient? = this as? dev.inmo.tgbotapi.types.BackgroundFill.FreeformGradient + +public inline fun BackgroundFill.freeformGradientOrThrow(): BackgroundFill.FreeformGradient = this as dev.inmo.tgbotapi.types.BackgroundFill.FreeformGradient + +public inline fun BackgroundFill.ifFreeformGradient(block: (BackgroundFill.FreeformGradient) -> T): T? = freeformGradientOrNull() ?.let(block) + +public inline fun BackgroundFill.unknownOrNull(): BackgroundFill.Unknown? = this as? dev.inmo.tgbotapi.types.BackgroundFill.Unknown + +public inline fun BackgroundFill.unknownOrThrow(): BackgroundFill.Unknown = this as dev.inmo.tgbotapi.types.BackgroundFill.Unknown + +public inline fun BackgroundFill.ifUnknown(block: (BackgroundFill.Unknown) -> T): T? = unknownOrNull() ?.let(block) + +public inline fun ReplyInfo.internalOrNull(): ReplyInfo.Internal? = this as? dev.inmo.tgbotapi.types.ReplyInfo.Internal + +public inline fun ReplyInfo.internalOrThrow(): ReplyInfo.Internal = this as dev.inmo.tgbotapi.types.ReplyInfo.Internal + +public inline fun ReplyInfo.ifInternal(block: (ReplyInfo.Internal) -> T): T? = internalOrNull() ?.let(block) + +public inline fun ReplyInfo.toStoryOrNull(): ReplyInfo.ToStory? = this as? dev.inmo.tgbotapi.types.ReplyInfo.ToStory + +public inline fun ReplyInfo.toStoryOrThrow(): ReplyInfo.ToStory = this as dev.inmo.tgbotapi.types.ReplyInfo.ToStory + +public inline fun ReplyInfo.ifToStory(block: (ReplyInfo.ToStory) -> T): T? = toStoryOrNull() ?.let(block) + +public inline fun ReplyInfo.externalOrNull(): ReplyInfo.External? = this as? dev.inmo.tgbotapi.types.ReplyInfo.External + +public inline fun ReplyInfo.externalOrThrow(): ReplyInfo.External = this as dev.inmo.tgbotapi.types.ReplyInfo.External + +public inline fun ReplyInfo.ifExternal(block: (ReplyInfo.External) -> T): T? = externalOrNull() ?.let(block) + +public inline fun ReplyInfo.externalTextOrNull(): ReplyInfo.External.Text? = this as? dev.inmo.tgbotapi.types.ReplyInfo.External.Text + +public inline fun ReplyInfo.externalTextOrThrow(): ReplyInfo.External.Text = this as dev.inmo.tgbotapi.types.ReplyInfo.External.Text + +public inline fun ReplyInfo.ifExternalText(block: (ReplyInfo.External.Text) -> T): T? = externalTextOrNull() ?.let(block) + +public inline fun ReplyInfo.externalContentOrNull(): ReplyInfo.External.Content? = this as? dev.inmo.tgbotapi.types.ReplyInfo.External.Content + +public inline fun ReplyInfo.externalContentOrThrow(): ReplyInfo.External.Content = this as dev.inmo.tgbotapi.types.ReplyInfo.External.Content + +public inline fun ReplyInfo.ifExternalContent(block: (ReplyInfo.External.Content) -> T): T? = externalContentOrNull() ?.let(block) + +public inline fun ReplyInfo.externalContentSimpleOrNull(): ReplyInfo.External.Content.Simple? = this as? dev.inmo.tgbotapi.types.ReplyInfo.External.Content.Simple + +public inline fun ReplyInfo.externalContentSimpleOrThrow(): ReplyInfo.External.Content.Simple = this as dev.inmo.tgbotapi.types.ReplyInfo.External.Content.Simple + +public inline fun ReplyInfo.ifExternalContentSimple(block: (ReplyInfo.External.Content.Simple) -> T): T? = externalContentSimpleOrNull() ?.let(block) + +public inline fun ReplyInfo.externalContentMediaOrNull(): ReplyInfo.External.Content.Media? = this as? dev.inmo.tgbotapi.types.ReplyInfo.External.Content.Media + +public inline fun ReplyInfo.externalContentMediaOrThrow(): ReplyInfo.External.Content.Media = this as dev.inmo.tgbotapi.types.ReplyInfo.External.Content.Media + +public inline fun ReplyInfo.ifExternalContentMedia(block: (ReplyInfo.External.Content.Media) -> T): T? = externalContentMediaOrNull() ?.let(block) + +public inline fun ChatBoostSource.byUserOrNull(): ChatBoostSource.ByUser? = this as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.ByUser + +public inline fun ChatBoostSource.byUserOrThrow(): ChatBoostSource.ByUser = this as dev.inmo.tgbotapi.types.boosts.ChatBoostSource.ByUser + +public inline fun ChatBoostSource.ifByUser(block: (ChatBoostSource.ByUser) -> T): T? = byUserOrNull() ?.let(block) + +public inline fun ChatBoostSource.premiumOrNull(): ChatBoostSource.Premium? = this as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Premium + +public inline fun ChatBoostSource.premiumOrThrow(): ChatBoostSource.Premium = this as dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Premium + +public inline fun ChatBoostSource.ifPremium(block: (ChatBoostSource.Premium) -> T): T? = premiumOrNull() ?.let(block) + +public inline fun ChatBoostSource.giftCodeOrNull(): ChatBoostSource.GiftCode? = this as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.GiftCode + +public inline fun ChatBoostSource.giftCodeOrThrow(): ChatBoostSource.GiftCode = this as dev.inmo.tgbotapi.types.boosts.ChatBoostSource.GiftCode + +public inline fun ChatBoostSource.ifGiftCode(block: (ChatBoostSource.GiftCode) -> T): T? = giftCodeOrNull() ?.let(block) + +public inline fun ChatBoostSource.giveawayOrNull(): ChatBoostSource.Giveaway? = this as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway + +public inline fun ChatBoostSource.giveawayOrThrow(): ChatBoostSource.Giveaway = this as dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway + +public inline fun ChatBoostSource.ifGiveaway(block: (ChatBoostSource.Giveaway) -> T): T? = giveawayOrNull() ?.let(block) + +public inline fun ChatBoostSource.unknownOrNull(): ChatBoostSource.Unknown? = this as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Unknown + +public inline fun ChatBoostSource.unknownOrThrow(): ChatBoostSource.Unknown = this as dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Unknown + +public inline fun ChatBoostSource.ifUnknown(block: (ChatBoostSource.Unknown) -> T): T? = unknownOrNull() ?.let(block) + +public inline fun ChatBoostSource.giveawayCreatedOrNull(): ChatBoostSource.Giveaway.Created? = this as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Created + +public inline fun ChatBoostSource.giveawayCreatedOrThrow(): ChatBoostSource.Giveaway.Created = this as dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Created + +public inline fun ChatBoostSource.ifGiveawayCreated(block: (ChatBoostSource.Giveaway.Created) -> T): T? = giveawayCreatedOrNull() ?.let(block) + +public inline fun ChatBoostSource.giveawayClaimedOrNull(): ChatBoostSource.Giveaway.Claimed? = this as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Claimed + +public inline fun ChatBoostSource.giveawayClaimedOrThrow(): ChatBoostSource.Giveaway.Claimed = this as dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Claimed + +public inline fun ChatBoostSource.ifGiveawayClaimed(block: (ChatBoostSource.Giveaway.Claimed) -> T): T? = giveawayClaimedOrNull() ?.let(block) + +public inline fun ChatBoostSource.giveawayUnclaimedOrNull(): ChatBoostSource.Giveaway.Unclaimed? = this as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Unclaimed + +public inline fun ChatBoostSource.giveawayUnclaimedOrThrow(): ChatBoostSource.Giveaway.Unclaimed = this as dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Unclaimed + +public inline fun ChatBoostSource.ifGiveawayUnclaimed(block: (ChatBoostSource.Giveaway.Unclaimed) -> T): T? = giveawayUnclaimedOrNull() ?.let(block) + +public inline fun BusinessConnection.enabledOrNull(): BusinessConnection.Enabled? = this as? dev.inmo.tgbotapi.types.business_connection.BusinessConnection.Enabled + +public inline fun BusinessConnection.enabledOrThrow(): BusinessConnection.Enabled = this as dev.inmo.tgbotapi.types.business_connection.BusinessConnection.Enabled + +public inline fun BusinessConnection.ifEnabled(block: (BusinessConnection.Enabled) -> T): T? = enabledOrNull() ?.let(block) + +public inline fun BusinessConnection.disabledOrNull(): BusinessConnection.Disabled? = this as? dev.inmo.tgbotapi.types.business_connection.BusinessConnection.Disabled + +public inline fun BusinessConnection.disabledOrThrow(): BusinessConnection.Disabled = this as dev.inmo.tgbotapi.types.business_connection.BusinessConnection.Disabled + +public inline fun BusinessConnection.ifDisabled(block: (BusinessConnection.Disabled) -> T): T? = disabledOrNull() ?.let(block) + +public inline fun Update.deletedBusinessMessageUpdateOrNull(): DeletedBusinessMessageUpdate? = this as? dev.inmo.tgbotapi.types.update.DeletedBusinessMessageUpdate + +public inline fun Update.deletedBusinessMessageUpdateOrThrow(): DeletedBusinessMessageUpdate = this as dev.inmo.tgbotapi.types.update.DeletedBusinessMessageUpdate + +public inline fun Update.ifDeletedBusinessMessageUpdate(block: (DeletedBusinessMessageUpdate) -> T): T? = deletedBusinessMessageUpdateOrNull() ?.let(block) + +public inline fun Update.editMessageUpdateOrNull(): EditMessageUpdate? = this as? dev.inmo.tgbotapi.types.update.EditMessageUpdate + +public inline fun Update.editMessageUpdateOrThrow(): EditMessageUpdate = this as dev.inmo.tgbotapi.types.update.EditMessageUpdate + +public inline fun Update.ifEditMessageUpdate(block: (EditMessageUpdate) -> T): T? = editMessageUpdateOrNull() ?.let(block) + +public inline fun Update.shippingQueryUpdateOrNull(): ShippingQueryUpdate? = this as? dev.inmo.tgbotapi.types.update.ShippingQueryUpdate + +public inline fun Update.shippingQueryUpdateOrThrow(): ShippingQueryUpdate = this as dev.inmo.tgbotapi.types.update.ShippingQueryUpdate + +public inline fun Update.ifShippingQueryUpdate(block: (ShippingQueryUpdate) -> T): T? = shippingQueryUpdateOrNull() ?.let(block) + +public inline fun Update.chatBoostUpdatedUpdateOrNull(): ChatBoostUpdatedUpdate? = this as? dev.inmo.tgbotapi.types.update.ChatBoostUpdatedUpdate + +public inline fun Update.chatBoostUpdatedUpdateOrThrow(): ChatBoostUpdatedUpdate = this as dev.inmo.tgbotapi.types.update.ChatBoostUpdatedUpdate + +public inline fun Update.ifChatBoostUpdatedUpdate(block: (ChatBoostUpdatedUpdate) -> T): T? = chatBoostUpdatedUpdateOrNull() ?.let(block) + +public inline fun Update.preCheckoutQueryUpdateOrNull(): PreCheckoutQueryUpdate? = this as? dev.inmo.tgbotapi.types.update.PreCheckoutQueryUpdate + +public inline fun Update.preCheckoutQueryUpdateOrThrow(): PreCheckoutQueryUpdate = this as dev.inmo.tgbotapi.types.update.PreCheckoutQueryUpdate + +public inline fun Update.ifPreCheckoutQueryUpdate(block: (PreCheckoutQueryUpdate) -> T): T? = preCheckoutQueryUpdateOrNull() ?.let(block) + +public inline fun Update.guestMessageUpdateOrNull(): GuestMessageUpdate? = this as? dev.inmo.tgbotapi.types.update.GuestMessageUpdate + +public inline fun Update.guestMessageUpdateOrThrow(): GuestMessageUpdate = this as dev.inmo.tgbotapi.types.update.GuestMessageUpdate + +public inline fun Update.ifGuestMessageUpdate(block: (GuestMessageUpdate) -> T): T? = guestMessageUpdateOrNull() ?.let(block) + +public inline fun Update.chatMessageReactionUpdatedUpdateOrNull(): ChatMessageReactionUpdatedUpdate? = this as? dev.inmo.tgbotapi.types.update.ChatMessageReactionUpdatedUpdate + +public inline fun Update.chatMessageReactionUpdatedUpdateOrThrow(): ChatMessageReactionUpdatedUpdate = this as dev.inmo.tgbotapi.types.update.ChatMessageReactionUpdatedUpdate + +public inline fun Update.ifChatMessageReactionUpdatedUpdate(block: (ChatMessageReactionUpdatedUpdate) -> T): T? = chatMessageReactionUpdatedUpdateOrNull() ?.let(block) + +public inline fun Update.inlineQueryUpdateOrNull(): InlineQueryUpdate? = this as? dev.inmo.tgbotapi.types.update.InlineQueryUpdate + +public inline fun Update.inlineQueryUpdateOrThrow(): InlineQueryUpdate = this as dev.inmo.tgbotapi.types.update.InlineQueryUpdate + +public inline fun Update.ifInlineQueryUpdate(block: (InlineQueryUpdate) -> T): T? = inlineQueryUpdateOrNull() ?.let(block) + +public inline fun Update.pollUpdateOrNull(): PollUpdate? = this as? dev.inmo.tgbotapi.types.update.PollUpdate + +public inline fun Update.pollUpdateOrThrow(): PollUpdate = this as dev.inmo.tgbotapi.types.update.PollUpdate + +public inline fun Update.ifPollUpdate(block: (PollUpdate) -> T): T? = pollUpdateOrNull() ?.let(block) + +public inline fun Update.editChannelPostUpdateOrNull(): EditChannelPostUpdate? = this as? dev.inmo.tgbotapi.types.update.EditChannelPostUpdate + +public inline fun Update.editChannelPostUpdateOrThrow(): EditChannelPostUpdate = this as dev.inmo.tgbotapi.types.update.EditChannelPostUpdate + +public inline fun Update.ifEditChannelPostUpdate(block: (EditChannelPostUpdate) -> T): T? = editChannelPostUpdateOrNull() ?.let(block) + +public inline fun Update.chosenInlineResultUpdateOrNull(): ChosenInlineResultUpdate? = this as? dev.inmo.tgbotapi.types.update.ChosenInlineResultUpdate + +public inline fun Update.chosenInlineResultUpdateOrThrow(): ChosenInlineResultUpdate = this as dev.inmo.tgbotapi.types.update.ChosenInlineResultUpdate + +public inline fun Update.ifChosenInlineResultUpdate(block: (ChosenInlineResultUpdate) -> T): T? = chosenInlineResultUpdateOrNull() ?.let(block) + +public inline fun Update.chatMessageReactionsCountUpdatedUpdateOrNull(): ChatMessageReactionsCountUpdatedUpdate? = this as? dev.inmo.tgbotapi.types.update.ChatMessageReactionsCountUpdatedUpdate + +public inline fun Update.chatMessageReactionsCountUpdatedUpdateOrThrow(): ChatMessageReactionsCountUpdatedUpdate = this as dev.inmo.tgbotapi.types.update.ChatMessageReactionsCountUpdatedUpdate + +public inline fun Update.ifChatMessageReactionsCountUpdatedUpdate(block: (ChatMessageReactionsCountUpdatedUpdate) -> T): T? = chatMessageReactionsCountUpdatedUpdateOrNull() ?.let(block) + +public inline fun Update.chatJoinRequestUpdateOrNull(): ChatJoinRequestUpdate? = this as? dev.inmo.tgbotapi.types.update.ChatJoinRequestUpdate + +public inline fun Update.chatJoinRequestUpdateOrThrow(): ChatJoinRequestUpdate = this as dev.inmo.tgbotapi.types.update.ChatJoinRequestUpdate + +public inline fun Update.ifChatJoinRequestUpdate(block: (ChatJoinRequestUpdate) -> T): T? = chatJoinRequestUpdateOrNull() ?.let(block) + +public inline fun Update.chatBoostRemovedUpdateOrNull(): ChatBoostRemovedUpdate? = this as? dev.inmo.tgbotapi.types.update.ChatBoostRemovedUpdate + +public inline fun Update.chatBoostRemovedUpdateOrThrow(): ChatBoostRemovedUpdate = this as dev.inmo.tgbotapi.types.update.ChatBoostRemovedUpdate + +public inline fun Update.ifChatBoostRemovedUpdate(block: (ChatBoostRemovedUpdate) -> T): T? = chatBoostRemovedUpdateOrNull() ?.let(block) + +public inline fun Update.baseEditMessageUpdateOrNull(): BaseEditMessageUpdate? = this as? dev.inmo.tgbotapi.types.update.abstracts.BaseEditMessageUpdate + +public inline fun Update.baseEditMessageUpdateOrThrow(): BaseEditMessageUpdate = this as dev.inmo.tgbotapi.types.update.abstracts.BaseEditMessageUpdate + +public inline fun Update.ifBaseEditMessageUpdate(block: (BaseEditMessageUpdate) -> T): T? = baseEditMessageUpdateOrNull() ?.let(block) + +public inline fun Update.unknownUpdateOrNull(): UnknownUpdate? = this as? dev.inmo.tgbotapi.types.update.abstracts.UnknownUpdate + +public inline fun Update.unknownUpdateOrThrow(): UnknownUpdate = this as dev.inmo.tgbotapi.types.update.abstracts.UnknownUpdate + +public inline fun Update.ifUnknownUpdate(block: (UnknownUpdate) -> T): T? = unknownUpdateOrNull() ?.let(block) + +public inline fun Update.baseMessageUpdateOrNull(): BaseMessageUpdate? = this as? dev.inmo.tgbotapi.types.update.abstracts.BaseMessageUpdate + +public inline fun Update.baseMessageUpdateOrThrow(): BaseMessageUpdate = this as dev.inmo.tgbotapi.types.update.abstracts.BaseMessageUpdate + +public inline fun Update.ifBaseMessageUpdate(block: (BaseMessageUpdate) -> T): T? = baseMessageUpdateOrNull() ?.let(block) + +public inline fun Update.chatMemberUpdatedUpdateOrNull(): ChatMemberUpdatedUpdate? = this as? dev.inmo.tgbotapi.types.update.abstracts.ChatMemberUpdatedUpdate + +public inline fun Update.chatMemberUpdatedUpdateOrThrow(): ChatMemberUpdatedUpdate = this as dev.inmo.tgbotapi.types.update.abstracts.ChatMemberUpdatedUpdate + +public inline fun Update.ifChatMemberUpdatedUpdate(block: (ChatMemberUpdatedUpdate) -> T): T? = chatMemberUpdatedUpdateOrNull() ?.let(block) + +public inline fun Update.baseSentMessageUpdateOrNull(): BaseSentMessageUpdate? = this as? dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate + +public inline fun Update.baseSentMessageUpdateOrThrow(): BaseSentMessageUpdate = this as dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate + +public inline fun Update.ifBaseSentMessageUpdate(block: (BaseSentMessageUpdate) -> T): T? = baseSentMessageUpdateOrNull() ?.let(block) + +public inline fun Update.commonChatMemberUpdatedUpdateOrNull(): CommonChatMemberUpdatedUpdate? = this as? dev.inmo.tgbotapi.types.update.CommonChatMemberUpdatedUpdate + +public inline fun Update.commonChatMemberUpdatedUpdateOrThrow(): CommonChatMemberUpdatedUpdate = this as dev.inmo.tgbotapi.types.update.CommonChatMemberUpdatedUpdate + +public inline fun Update.ifCommonChatMemberUpdatedUpdate(block: (CommonChatMemberUpdatedUpdate) -> T): T? = commonChatMemberUpdatedUpdateOrNull() ?.let(block) + +public inline fun Update.editBusinessMessageUpdateOrNull(): EditBusinessMessageUpdate? = this as? dev.inmo.tgbotapi.types.update.EditBusinessMessageUpdate + +public inline fun Update.editBusinessMessageUpdateOrThrow(): EditBusinessMessageUpdate = this as dev.inmo.tgbotapi.types.update.EditBusinessMessageUpdate + +public inline fun Update.ifEditBusinessMessageUpdate(block: (EditBusinessMessageUpdate) -> T): T? = editBusinessMessageUpdateOrNull() ?.let(block) + +public inline fun Update.paidMediaPurchasedUpdateOrNull(): PaidMediaPurchasedUpdate? = this as? dev.inmo.tgbotapi.types.update.PaidMediaPurchasedUpdate + +public inline fun Update.paidMediaPurchasedUpdateOrThrow(): PaidMediaPurchasedUpdate = this as dev.inmo.tgbotapi.types.update.PaidMediaPurchasedUpdate + +public inline fun Update.ifPaidMediaPurchasedUpdate(block: (PaidMediaPurchasedUpdate) -> T): T? = paidMediaPurchasedUpdateOrNull() ?.let(block) + +public inline fun Update.managedBotUpdateOrNull(): ManagedBotUpdate? = this as? dev.inmo.tgbotapi.types.update.ManagedBotUpdate + +public inline fun Update.managedBotUpdateOrThrow(): ManagedBotUpdate = this as dev.inmo.tgbotapi.types.update.ManagedBotUpdate + +public inline fun Update.ifManagedBotUpdate(block: (ManagedBotUpdate) -> T): T? = managedBotUpdateOrNull() ?.let(block) + +public inline fun Update.messageUpdateOrNull(): MessageUpdate? = this as? dev.inmo.tgbotapi.types.update.MessageUpdate + +public inline fun Update.messageUpdateOrThrow(): MessageUpdate = this as dev.inmo.tgbotapi.types.update.MessageUpdate + +public inline fun Update.ifMessageUpdate(block: (MessageUpdate) -> T): T? = messageUpdateOrNull() ?.let(block) + +public inline fun Update.myChatMemberUpdatedUpdateOrNull(): MyChatMemberUpdatedUpdate? = this as? dev.inmo.tgbotapi.types.update.MyChatMemberUpdatedUpdate + +public inline fun Update.myChatMemberUpdatedUpdateOrThrow(): MyChatMemberUpdatedUpdate = this as dev.inmo.tgbotapi.types.update.MyChatMemberUpdatedUpdate + +public inline fun Update.ifMyChatMemberUpdatedUpdate(block: (MyChatMemberUpdatedUpdate) -> T): T? = myChatMemberUpdatedUpdateOrNull() ?.let(block) + +public inline fun Update.businessConnectionUpdateOrNull(): BusinessConnectionUpdate? = this as? dev.inmo.tgbotapi.types.update.BusinessConnectionUpdate + +public inline fun Update.businessConnectionUpdateOrThrow(): BusinessConnectionUpdate = this as dev.inmo.tgbotapi.types.update.BusinessConnectionUpdate + +public inline fun Update.ifBusinessConnectionUpdate(block: (BusinessConnectionUpdate) -> T): T? = businessConnectionUpdateOrNull() ?.let(block) + +public inline fun Update.channelPostUpdateOrNull(): ChannelPostUpdate? = this as? dev.inmo.tgbotapi.types.update.ChannelPostUpdate + +public inline fun Update.channelPostUpdateOrThrow(): ChannelPostUpdate = this as dev.inmo.tgbotapi.types.update.ChannelPostUpdate + +public inline fun Update.ifChannelPostUpdate(block: (ChannelPostUpdate) -> T): T? = channelPostUpdateOrNull() ?.let(block) + +public inline fun Update.businessMessageUpdateOrNull(): BusinessMessageUpdate? = this as? dev.inmo.tgbotapi.types.update.BusinessMessageUpdate + +public inline fun Update.businessMessageUpdateOrThrow(): BusinessMessageUpdate = this as dev.inmo.tgbotapi.types.update.BusinessMessageUpdate + +public inline fun Update.ifBusinessMessageUpdate(block: (BusinessMessageUpdate) -> T): T? = businessMessageUpdateOrNull() ?.let(block) + +public inline fun Update.callbackQueryUpdateOrNull(): CallbackQueryUpdate? = this as? dev.inmo.tgbotapi.types.update.CallbackQueryUpdate + +public inline fun Update.callbackQueryUpdateOrThrow(): CallbackQueryUpdate = this as dev.inmo.tgbotapi.types.update.CallbackQueryUpdate + +public inline fun Update.ifCallbackQueryUpdate(block: (CallbackQueryUpdate) -> T): T? = callbackQueryUpdateOrNull() ?.let(block) + +public inline fun Update.pollAnswerUpdateOrNull(): PollAnswerUpdate? = this as? dev.inmo.tgbotapi.types.update.PollAnswerUpdate + +public inline fun Update.pollAnswerUpdateOrThrow(): PollAnswerUpdate = this as dev.inmo.tgbotapi.types.update.PollAnswerUpdate + +public inline fun Update.ifPollAnswerUpdate(block: (PollAnswerUpdate) -> T): T? = pollAnswerUpdateOrNull() ?.let(block) + +public inline fun KeyboardButtonRequestUsers.anyOrNull(): KeyboardButtonRequestUsers.Any? = this as? dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Any + +public inline fun KeyboardButtonRequestUsers.anyOrThrow(): KeyboardButtonRequestUsers.Any = this as dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Any + +public inline fun KeyboardButtonRequestUsers.ifAny(block: (KeyboardButtonRequestUsers.Any) -> T): T? = anyOrNull() ?.let(block) + +public inline fun KeyboardButtonRequestUsers.commonOrNull(): KeyboardButtonRequestUsers.Common? = this as? dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Common + +public inline fun KeyboardButtonRequestUsers.commonOrThrow(): KeyboardButtonRequestUsers.Common = this as dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Common + +public inline fun KeyboardButtonRequestUsers.ifCommon(block: (KeyboardButtonRequestUsers.Common) -> T): T? = commonOrNull() ?.let(block) + +public inline fun KeyboardButtonRequestUsers.botOrNull(): KeyboardButtonRequestUsers.Bot? = this as? dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Bot + +public inline fun KeyboardButtonRequestUsers.botOrThrow(): KeyboardButtonRequestUsers.Bot = this as dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Bot + +public inline fun KeyboardButtonRequestUsers.ifBot(block: (KeyboardButtonRequestUsers.Bot) -> T): T? = botOrNull() ?.let(block) + +public inline fun InlineKeyboardButton.unknownInlineKeyboardButtonOrNull(): UnknownInlineKeyboardButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.UnknownInlineKeyboardButton + +public inline fun InlineKeyboardButton.unknownInlineKeyboardButtonOrThrow(): UnknownInlineKeyboardButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.UnknownInlineKeyboardButton + +public inline fun InlineKeyboardButton.ifUnknownInlineKeyboardButton(block: (UnknownInlineKeyboardButton) -> T): T? = unknownInlineKeyboardButtonOrNull() ?.let(block) + +public inline fun InlineKeyboardButton.payInlineKeyboardButtonOrNull(): PayInlineKeyboardButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.PayInlineKeyboardButton + +public inline fun InlineKeyboardButton.payInlineKeyboardButtonOrThrow(): PayInlineKeyboardButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.PayInlineKeyboardButton + +public inline fun InlineKeyboardButton.ifPayInlineKeyboardButton(block: (PayInlineKeyboardButton) -> T): T? = payInlineKeyboardButtonOrNull() ?.let(block) + +public inline fun InlineKeyboardButton.callbackDataInlineKeyboardButtonOrNull(): CallbackDataInlineKeyboardButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CallbackDataInlineKeyboardButton + +public inline fun InlineKeyboardButton.callbackDataInlineKeyboardButtonOrThrow(): CallbackDataInlineKeyboardButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CallbackDataInlineKeyboardButton + +public inline fun InlineKeyboardButton.ifCallbackDataInlineKeyboardButton(block: (CallbackDataInlineKeyboardButton) -> T): T? = callbackDataInlineKeyboardButtonOrNull() ?.let(block) + +public inline fun InlineKeyboardButton.callbackGameInlineKeyboardButtonOrNull(): CallbackGameInlineKeyboardButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CallbackGameInlineKeyboardButton + +public inline fun InlineKeyboardButton.callbackGameInlineKeyboardButtonOrThrow(): CallbackGameInlineKeyboardButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CallbackGameInlineKeyboardButton + +public inline fun InlineKeyboardButton.ifCallbackGameInlineKeyboardButton(block: (CallbackGameInlineKeyboardButton) -> T): T? = callbackGameInlineKeyboardButtonOrNull() ?.let(block) + +public inline fun InlineKeyboardButton.loginURLInlineKeyboardButtonOrNull(): LoginURLInlineKeyboardButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.LoginURLInlineKeyboardButton + +public inline fun InlineKeyboardButton.loginURLInlineKeyboardButtonOrThrow(): LoginURLInlineKeyboardButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.LoginURLInlineKeyboardButton + +public inline fun InlineKeyboardButton.ifLoginURLInlineKeyboardButton(block: (LoginURLInlineKeyboardButton) -> T): T? = loginURLInlineKeyboardButtonOrNull() ?.let(block) + +public inline fun InlineKeyboardButton.switchInlineQueryCurrentChatInlineKeyboardButtonOrNull(): SwitchInlineQueryCurrentChatInlineKeyboardButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.SwitchInlineQueryCurrentChatInlineKeyboardButton + +public inline fun InlineKeyboardButton.switchInlineQueryCurrentChatInlineKeyboardButtonOrThrow(): SwitchInlineQueryCurrentChatInlineKeyboardButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.SwitchInlineQueryCurrentChatInlineKeyboardButton + +public inline fun InlineKeyboardButton.ifSwitchInlineQueryCurrentChatInlineKeyboardButton(block: (SwitchInlineQueryCurrentChatInlineKeyboardButton) -> T): T? = switchInlineQueryCurrentChatInlineKeyboardButtonOrNull() ?.let(block) + +public inline fun InlineKeyboardButton.switchInlineQueryChosenChatInlineKeyboardButtonOrNull(): SwitchInlineQueryChosenChatInlineKeyboardButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.SwitchInlineQueryChosenChatInlineKeyboardButton + +public inline fun InlineKeyboardButton.switchInlineQueryChosenChatInlineKeyboardButtonOrThrow(): SwitchInlineQueryChosenChatInlineKeyboardButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.SwitchInlineQueryChosenChatInlineKeyboardButton + +public inline fun InlineKeyboardButton.ifSwitchInlineQueryChosenChatInlineKeyboardButton(block: (SwitchInlineQueryChosenChatInlineKeyboardButton) -> T): T? = switchInlineQueryChosenChatInlineKeyboardButtonOrNull() ?.let(block) + +public inline fun InlineKeyboardButton.switchInlineQueryInlineKeyboardButtonOrNull(): SwitchInlineQueryInlineKeyboardButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.SwitchInlineQueryInlineKeyboardButton + +public inline fun InlineKeyboardButton.switchInlineQueryInlineKeyboardButtonOrThrow(): SwitchInlineQueryInlineKeyboardButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.SwitchInlineQueryInlineKeyboardButton + +public inline fun InlineKeyboardButton.ifSwitchInlineQueryInlineKeyboardButton(block: (SwitchInlineQueryInlineKeyboardButton) -> T): T? = switchInlineQueryInlineKeyboardButtonOrNull() ?.let(block) + +public inline fun InlineKeyboardButton.uRLInlineKeyboardButtonOrNull(): URLInlineKeyboardButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.URLInlineKeyboardButton + +public inline fun InlineKeyboardButton.uRLInlineKeyboardButtonOrThrow(): URLInlineKeyboardButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.URLInlineKeyboardButton + +public inline fun InlineKeyboardButton.ifURLInlineKeyboardButton(block: (URLInlineKeyboardButton) -> T): T? = uRLInlineKeyboardButtonOrNull() ?.let(block) + +public inline fun InlineKeyboardButton.copyTextButtonOrNull(): CopyTextButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CopyTextButton + +public inline fun InlineKeyboardButton.copyTextButtonOrThrow(): CopyTextButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CopyTextButton + +public inline fun InlineKeyboardButton.ifCopyTextButton(block: (CopyTextButton) -> T): T? = copyTextButtonOrNull() ?.let(block) + +public inline fun InlineKeyboardButton.webAppInlineKeyboardButtonOrNull(): WebAppInlineKeyboardButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.WebAppInlineKeyboardButton + +public inline fun InlineKeyboardButton.webAppInlineKeyboardButtonOrThrow(): WebAppInlineKeyboardButton = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.WebAppInlineKeyboardButton + +public inline fun InlineKeyboardButton.ifWebAppInlineKeyboardButton(block: (WebAppInlineKeyboardButton) -> T): T? = webAppInlineKeyboardButtonOrNull() ?.let(block) + +public inline fun KeyboardMarkup.inlineKeyboardMarkupOrNull(): InlineKeyboardMarkup? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup + +public inline fun KeyboardMarkup.inlineKeyboardMarkupOrThrow(): InlineKeyboardMarkup = this as dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup + +public inline fun KeyboardMarkup.ifInlineKeyboardMarkup(block: (InlineKeyboardMarkup) -> T): T? = inlineKeyboardMarkupOrNull() ?.let(block) + +public inline fun KeyboardMarkup.replyKeyboardRemoveOrNull(): ReplyKeyboardRemove? = this as? dev.inmo.tgbotapi.types.buttons.ReplyKeyboardRemove + +public inline fun KeyboardMarkup.replyKeyboardRemoveOrThrow(): ReplyKeyboardRemove = this as dev.inmo.tgbotapi.types.buttons.ReplyKeyboardRemove + +public inline fun KeyboardMarkup.ifReplyKeyboardRemove(block: (ReplyKeyboardRemove) -> T): T? = replyKeyboardRemoveOrNull() ?.let(block) + +public inline fun KeyboardMarkup.replyForceOrNull(): ReplyForce? = this as? dev.inmo.tgbotapi.types.buttons.ReplyForce + +public inline fun KeyboardMarkup.replyForceOrThrow(): ReplyForce = this as dev.inmo.tgbotapi.types.buttons.ReplyForce + +public inline fun KeyboardMarkup.ifReplyForce(block: (ReplyForce) -> T): T? = replyForceOrNull() ?.let(block) + +public inline fun KeyboardMarkup.replyKeyboardMarkupOrNull(): ReplyKeyboardMarkup? = this as? dev.inmo.tgbotapi.types.buttons.ReplyKeyboardMarkup + +public inline fun KeyboardMarkup.replyKeyboardMarkupOrThrow(): ReplyKeyboardMarkup = this as dev.inmo.tgbotapi.types.buttons.ReplyKeyboardMarkup + +public inline fun KeyboardMarkup.ifReplyKeyboardMarkup(block: (ReplyKeyboardMarkup) -> T): T? = replyKeyboardMarkupOrNull() ?.let(block) + +public inline fun DiceAnimationType.cubeDiceAnimationTypeOrNull(): CubeDiceAnimationType? = this as? dev.inmo.tgbotapi.types.dice.CubeDiceAnimationType + +public inline fun DiceAnimationType.cubeDiceAnimationTypeOrThrow(): CubeDiceAnimationType = this as dev.inmo.tgbotapi.types.dice.CubeDiceAnimationType + +public inline fun DiceAnimationType.ifCubeDiceAnimationType(block: (CubeDiceAnimationType) -> T): T? = cubeDiceAnimationTypeOrNull() ?.let(block) + +public inline fun DiceAnimationType.dartsDiceAnimationTypeOrNull(): DartsDiceAnimationType? = this as? dev.inmo.tgbotapi.types.dice.DartsDiceAnimationType + +public inline fun DiceAnimationType.dartsDiceAnimationTypeOrThrow(): DartsDiceAnimationType = this as dev.inmo.tgbotapi.types.dice.DartsDiceAnimationType + +public inline fun DiceAnimationType.ifDartsDiceAnimationType(block: (DartsDiceAnimationType) -> T): T? = dartsDiceAnimationTypeOrNull() ?.let(block) + +public inline fun DiceAnimationType.basketballDiceAnimationTypeOrNull(): BasketballDiceAnimationType? = this as? dev.inmo.tgbotapi.types.dice.BasketballDiceAnimationType + +public inline fun DiceAnimationType.basketballDiceAnimationTypeOrThrow(): BasketballDiceAnimationType = this as dev.inmo.tgbotapi.types.dice.BasketballDiceAnimationType + +public inline fun DiceAnimationType.ifBasketballDiceAnimationType(block: (BasketballDiceAnimationType) -> T): T? = basketballDiceAnimationTypeOrNull() ?.let(block) + +public inline fun DiceAnimationType.footballDiceAnimationTypeOrNull(): FootballDiceAnimationType? = this as? dev.inmo.tgbotapi.types.dice.FootballDiceAnimationType + +public inline fun DiceAnimationType.footballDiceAnimationTypeOrThrow(): FootballDiceAnimationType = this as dev.inmo.tgbotapi.types.dice.FootballDiceAnimationType + +public inline fun DiceAnimationType.ifFootballDiceAnimationType(block: (FootballDiceAnimationType) -> T): T? = footballDiceAnimationTypeOrNull() ?.let(block) + +public inline fun DiceAnimationType.bowlingDiceAnimationTypeOrNull(): BowlingDiceAnimationType? = this as? dev.inmo.tgbotapi.types.dice.BowlingDiceAnimationType + +public inline fun DiceAnimationType.bowlingDiceAnimationTypeOrThrow(): BowlingDiceAnimationType = this as dev.inmo.tgbotapi.types.dice.BowlingDiceAnimationType + +public inline fun DiceAnimationType.ifBowlingDiceAnimationType(block: (BowlingDiceAnimationType) -> T): T? = bowlingDiceAnimationTypeOrNull() ?.let(block) + +public inline fun DiceAnimationType.slotMachineDiceAnimationTypeOrNull(): SlotMachineDiceAnimationType? = this as? dev.inmo.tgbotapi.types.dice.SlotMachineDiceAnimationType + +public inline fun DiceAnimationType.slotMachineDiceAnimationTypeOrThrow(): SlotMachineDiceAnimationType = this as dev.inmo.tgbotapi.types.dice.SlotMachineDiceAnimationType + +public inline fun DiceAnimationType.ifSlotMachineDiceAnimationType(block: (SlotMachineDiceAnimationType) -> T): T? = slotMachineDiceAnimationTypeOrNull() ?.let(block) + +public inline fun DiceAnimationType.customDiceAnimationTypeOrNull(): CustomDiceAnimationType? = this as? dev.inmo.tgbotapi.types.dice.CustomDiceAnimationType + +public inline fun DiceAnimationType.customDiceAnimationTypeOrThrow(): CustomDiceAnimationType = this as dev.inmo.tgbotapi.types.dice.CustomDiceAnimationType + +public inline fun DiceAnimationType.ifCustomDiceAnimationType(block: (CustomDiceAnimationType) -> T): T? = customDiceAnimationTypeOrNull() ?.let(block) public inline fun Chat.usernameChatOrNull(): UsernameChat? = this as? dev.inmo.tgbotapi.types.chat.UsernameChat @@ -3148,6 +3888,168 @@ public inline fun Chat.ableToAddInAttachmentMenuChatOrThrow(): AbleToAddInAttach public inline fun Chat.ifAbleToAddInAttachmentMenuChat(block: (AbleToAddInAttachmentMenuChat) -> T): T? = ableToAddInAttachmentMenuChatOrNull() ?.let(block) +public inline fun Chat.unknownChatTypeOrNull(): UnknownChatType? = this as? dev.inmo.tgbotapi.types.chat.UnknownChatType + +public inline fun Chat.unknownChatTypeOrThrow(): UnknownChatType = this as dev.inmo.tgbotapi.types.chat.UnknownChatType + +public inline fun Chat.ifUnknownChatType(block: (UnknownChatType) -> T): T? = unknownChatTypeOrNull() ?.let(block) + +public inline fun Chat.extendedChatOrNull(): ExtendedChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedChat + +public inline fun Chat.extendedChatOrThrow(): ExtendedChat = this as dev.inmo.tgbotapi.types.chat.ExtendedChat + +public inline fun Chat.ifExtendedChat(block: (ExtendedChat) -> T): T? = extendedChatOrNull() ?.let(block) + +public inline fun Chat.extendedNonBotChatOrNull(): ExtendedNonBotChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedNonBotChat + +public inline fun Chat.extendedNonBotChatOrThrow(): ExtendedNonBotChat = this as dev.inmo.tgbotapi.types.chat.ExtendedNonBotChat + +public inline fun Chat.ifExtendedNonBotChat(block: (ExtendedNonBotChat) -> T): T? = extendedNonBotChatOrNull() ?.let(block) + +public inline fun Chat.extendedChannelChatOrNull(): ExtendedChannelChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedChannelChat + +public inline fun Chat.extendedChannelChatOrThrow(): ExtendedChannelChat = this as dev.inmo.tgbotapi.types.chat.ExtendedChannelChat + +public inline fun Chat.ifExtendedChannelChat(block: (ExtendedChannelChat) -> T): T? = extendedChannelChatOrNull() ?.let(block) + +public inline fun Chat.extendedGroupChatOrNull(): ExtendedGroupChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedGroupChat + +public inline fun Chat.extendedGroupChatOrThrow(): ExtendedGroupChat = this as dev.inmo.tgbotapi.types.chat.ExtendedGroupChat + +public inline fun Chat.ifExtendedGroupChat(block: (ExtendedGroupChat) -> T): T? = extendedGroupChatOrNull() ?.let(block) + +public inline fun Chat.extendedPrivateChatOrNull(): ExtendedPrivateChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedPrivateChat + +public inline fun Chat.extendedPrivateChatOrThrow(): ExtendedPrivateChat = this as dev.inmo.tgbotapi.types.chat.ExtendedPrivateChat + +public inline fun Chat.ifExtendedPrivateChat(block: (ExtendedPrivateChat) -> T): T? = extendedPrivateChatOrNull() ?.let(block) + +public inline fun Chat.extendedPrivateForumChatOrNull(): ExtendedPrivateForumChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedPrivateForumChat + +public inline fun Chat.extendedPrivateForumChatOrThrow(): ExtendedPrivateForumChat = this as dev.inmo.tgbotapi.types.chat.ExtendedPrivateForumChat + +public inline fun Chat.ifExtendedPrivateForumChat(block: (ExtendedPrivateForumChat) -> T): T? = extendedPrivateForumChatOrNull() ?.let(block) + +public inline fun Chat.extendedPublicChatOrNull(): ExtendedPublicChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedPublicChat + +public inline fun Chat.extendedPublicChatOrThrow(): ExtendedPublicChat = this as dev.inmo.tgbotapi.types.chat.ExtendedPublicChat + +public inline fun Chat.ifExtendedPublicChat(block: (ExtendedPublicChat) -> T): T? = extendedPublicChatOrNull() ?.let(block) + +public inline fun Chat.extendedSupergroupChatOrNull(): ExtendedSupergroupChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedSupergroupChat + +public inline fun Chat.extendedSupergroupChatOrThrow(): ExtendedSupergroupChat = this as dev.inmo.tgbotapi.types.chat.ExtendedSupergroupChat + +public inline fun Chat.ifExtendedSupergroupChat(block: (ExtendedSupergroupChat) -> T): T? = extendedSupergroupChatOrNull() ?.let(block) + +public inline fun Chat.extendedForumChatOrNull(): ExtendedForumChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedForumChat + +public inline fun Chat.extendedForumChatOrThrow(): ExtendedForumChat = this as dev.inmo.tgbotapi.types.chat.ExtendedForumChat + +public inline fun Chat.ifExtendedForumChat(block: (ExtendedForumChat) -> T): T? = extendedForumChatOrNull() ?.let(block) + +public inline fun Chat.extendedChannelDirectMessagesChatOrNull(): ExtendedChannelDirectMessagesChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedChannelDirectMessagesChat + +public inline fun Chat.extendedChannelDirectMessagesChatOrThrow(): ExtendedChannelDirectMessagesChat = this as dev.inmo.tgbotapi.types.chat.ExtendedChannelDirectMessagesChat + +public inline fun Chat.ifExtendedChannelDirectMessagesChat(block: (ExtendedChannelDirectMessagesChat) -> T): T? = extendedChannelDirectMessagesChatOrNull() ?.let(block) + +public inline fun Chat.extendedChatWithUsernameOrNull(): ExtendedChatWithUsername? = this as? dev.inmo.tgbotapi.types.chat.ExtendedChatWithUsername + +public inline fun Chat.extendedChatWithUsernameOrThrow(): ExtendedChatWithUsername = this as dev.inmo.tgbotapi.types.chat.ExtendedChatWithUsername + +public inline fun Chat.ifExtendedChatWithUsername(block: (ExtendedChatWithUsername) -> T): T? = extendedChatWithUsernameOrNull() ?.let(block) + +public inline fun Chat.extendedBusinessChatOrNull(): ExtendedBusinessChat? = this as? dev.inmo.tgbotapi.types.chat.ExtendedBusinessChat + +public inline fun Chat.extendedBusinessChatOrThrow(): ExtendedBusinessChat = this as dev.inmo.tgbotapi.types.chat.ExtendedBusinessChat + +public inline fun Chat.ifExtendedBusinessChat(block: (ExtendedBusinessChat) -> T): T? = extendedBusinessChatOrNull() ?.let(block) + +public inline fun Chat.previewChatOrNull(): PreviewChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewChat + +public inline fun Chat.previewChatOrThrow(): PreviewChat = this as dev.inmo.tgbotapi.types.chat.PreviewChat + +public inline fun Chat.ifPreviewChat(block: (PreviewChat) -> T): T? = previewChatOrNull() ?.let(block) + +public inline fun Chat.previewUsernameChatOrNull(): PreviewUsernameChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewUsernameChat + +public inline fun Chat.previewUsernameChatOrThrow(): PreviewUsernameChat = this as dev.inmo.tgbotapi.types.chat.PreviewUsernameChat + +public inline fun Chat.ifPreviewUsernameChat(block: (PreviewUsernameChat) -> T): T? = previewUsernameChatOrNull() ?.let(block) + +public inline fun Chat.previewPrivateChatOrNull(): PreviewPrivateChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewPrivateChat + +public inline fun Chat.previewPrivateChatOrThrow(): PreviewPrivateChat = this as dev.inmo.tgbotapi.types.chat.PreviewPrivateChat + +public inline fun Chat.ifPreviewPrivateChat(block: (PreviewPrivateChat) -> T): T? = previewPrivateChatOrNull() ?.let(block) + +public inline fun Chat.previewPrivateForumChatOrNull(): PreviewPrivateForumChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewPrivateForumChat + +public inline fun Chat.previewPrivateForumChatOrThrow(): PreviewPrivateForumChat = this as dev.inmo.tgbotapi.types.chat.PreviewPrivateForumChat + +public inline fun Chat.ifPreviewPrivateForumChat(block: (PreviewPrivateForumChat) -> T): T? = previewPrivateForumChatOrNull() ?.let(block) + +public inline fun Chat.previewBusinessChatOrNull(): PreviewBusinessChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewBusinessChat + +public inline fun Chat.previewBusinessChatOrThrow(): PreviewBusinessChat = this as dev.inmo.tgbotapi.types.chat.PreviewBusinessChat + +public inline fun Chat.ifPreviewBusinessChat(block: (PreviewBusinessChat) -> T): T? = previewBusinessChatOrNull() ?.let(block) + +public inline fun Chat.previewPublicChatOrNull(): PreviewPublicChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewPublicChat + +public inline fun Chat.previewPublicChatOrThrow(): PreviewPublicChat = this as dev.inmo.tgbotapi.types.chat.PreviewPublicChat + +public inline fun Chat.ifPreviewPublicChat(block: (PreviewPublicChat) -> T): T? = previewPublicChatOrNull() ?.let(block) + +public inline fun Chat.previewSuperPublicChatOrNull(): PreviewSuperPublicChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewSuperPublicChat + +public inline fun Chat.previewSuperPublicChatOrThrow(): PreviewSuperPublicChat = this as dev.inmo.tgbotapi.types.chat.PreviewSuperPublicChat + +public inline fun Chat.ifPreviewSuperPublicChat(block: (PreviewSuperPublicChat) -> T): T? = previewSuperPublicChatOrNull() ?.let(block) + +public inline fun Chat.previewChannelChatOrNull(): PreviewChannelChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewChannelChat + +public inline fun Chat.previewChannelChatOrThrow(): PreviewChannelChat = this as dev.inmo.tgbotapi.types.chat.PreviewChannelChat + +public inline fun Chat.ifPreviewChannelChat(block: (PreviewChannelChat) -> T): T? = previewChannelChatOrNull() ?.let(block) + +public inline fun Chat.previewGroupChatOrNull(): PreviewGroupChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewGroupChat + +public inline fun Chat.previewGroupChatOrThrow(): PreviewGroupChat = this as dev.inmo.tgbotapi.types.chat.PreviewGroupChat + +public inline fun Chat.ifPreviewGroupChat(block: (PreviewGroupChat) -> T): T? = previewGroupChatOrNull() ?.let(block) + +public inline fun Chat.previewSupergroupChatOrNull(): PreviewSupergroupChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewSupergroupChat + +public inline fun Chat.previewSupergroupChatOrThrow(): PreviewSupergroupChat = this as dev.inmo.tgbotapi.types.chat.PreviewSupergroupChat + +public inline fun Chat.ifPreviewSupergroupChat(block: (PreviewSupergroupChat) -> T): T? = previewSupergroupChatOrNull() ?.let(block) + +public inline fun Chat.previewForumChatOrNull(): PreviewForumChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewForumChat + +public inline fun Chat.previewForumChatOrThrow(): PreviewForumChat = this as dev.inmo.tgbotapi.types.chat.PreviewForumChat + +public inline fun Chat.ifPreviewForumChat(block: (PreviewForumChat) -> T): T? = previewForumChatOrNull() ?.let(block) + +public inline fun Chat.previewChannelDirectMessagesChatOrNull(): PreviewChannelDirectMessagesChat? = this as? dev.inmo.tgbotapi.types.chat.PreviewChannelDirectMessagesChat + +public inline fun Chat.previewChannelDirectMessagesChatOrThrow(): PreviewChannelDirectMessagesChat = this as dev.inmo.tgbotapi.types.chat.PreviewChannelDirectMessagesChat + +public inline fun Chat.ifPreviewChannelDirectMessagesChat(block: (PreviewChannelDirectMessagesChat) -> T): T? = previewChannelDirectMessagesChatOrNull() ?.let(block) + +public inline fun Chat.extendedBotOrNull(): ExtendedBot? = this as? dev.inmo.tgbotapi.types.chat.ExtendedBot + +public inline fun Chat.extendedBotOrThrow(): ExtendedBot = this as dev.inmo.tgbotapi.types.chat.ExtendedBot + +public inline fun Chat.ifExtendedBot(block: (ExtendedBot) -> T): T? = extendedBotOrNull() ?.let(block) + +public inline fun Chat.unknownExtendedChatOrNull(): UnknownExtendedChat? = this as? dev.inmo.tgbotapi.types.chat.UnknownExtendedChat + +public inline fun Chat.unknownExtendedChatOrThrow(): UnknownExtendedChat = this as dev.inmo.tgbotapi.types.chat.UnknownExtendedChat + +public inline fun Chat.ifUnknownExtendedChat(block: (UnknownExtendedChat) -> T): T? = unknownExtendedChatOrNull() ?.let(block) + public inline fun Chat.userOrNull(): User? = this as? dev.inmo.tgbotapi.types.chat.User public inline fun Chat.userOrThrow(): User = this as dev.inmo.tgbotapi.types.chat.User @@ -3184,881 +4086,59 @@ public inline fun Chat.commonUserOrThrow(): CommonUser = this as dev.inmo.tgbota public inline fun Chat.ifCommonUser(block: (CommonUser) -> T): T? = commonUserOrNull() ?.let(block) -public inline fun TelegramMedia.telegramPaidMediaLivePhotoOrNull(): TelegramPaidMediaLivePhoto? = this as? dev.inmo.tgbotapi.types.media.TelegramPaidMediaLivePhoto +public inline fun ChatMessageReactionUpdated.byUserOrNull(): ChatMessageReactionUpdated.ByUser? = this as? dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated.ByUser -public inline fun TelegramMedia.telegramPaidMediaLivePhotoOrThrow(): TelegramPaidMediaLivePhoto = this as dev.inmo.tgbotapi.types.media.TelegramPaidMediaLivePhoto +public inline fun ChatMessageReactionUpdated.byUserOrThrow(): ChatMessageReactionUpdated.ByUser = this as dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated.ByUser -public inline fun TelegramMedia.ifTelegramPaidMediaLivePhoto(block: (TelegramPaidMediaLivePhoto) -> T): T? = telegramPaidMediaLivePhotoOrNull() ?.let(block) +public inline fun ChatMessageReactionUpdated.ifByUser(block: (ChatMessageReactionUpdated.ByUser) -> T): T? = byUserOrNull() ?.let(block) -public inline fun TelegramMedia.telegramPaidMediaPhotoOrNull(): TelegramPaidMediaPhoto? = this as? dev.inmo.tgbotapi.types.media.TelegramPaidMediaPhoto +public inline fun ChatMessageReactionUpdated.byChatOrNull(): ChatMessageReactionUpdated.ByChat? = this as? dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated.ByChat -public inline fun TelegramMedia.telegramPaidMediaPhotoOrThrow(): TelegramPaidMediaPhoto = this as dev.inmo.tgbotapi.types.media.TelegramPaidMediaPhoto +public inline fun ChatMessageReactionUpdated.byChatOrThrow(): ChatMessageReactionUpdated.ByChat = this as dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated.ByChat -public inline fun TelegramMedia.ifTelegramPaidMediaPhoto(block: (TelegramPaidMediaPhoto) -> T): T? = telegramPaidMediaPhotoOrNull() ?.let(block) +public inline fun ChatMessageReactionUpdated.ifByChat(block: (ChatMessageReactionUpdated.ByChat) -> T): T? = byChatOrNull() ?.let(block) -public inline fun TelegramMedia.telegramMediaDocumentOrNull(): TelegramMediaDocument? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaDocument +public inline fun ChatMessageReactionUpdated.unknownOrNull(): ChatMessageReactionUpdated.Unknown? = this as? dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated.Unknown -public inline fun TelegramMedia.telegramMediaDocumentOrThrow(): TelegramMediaDocument = this as dev.inmo.tgbotapi.types.media.TelegramMediaDocument +public inline fun ChatMessageReactionUpdated.unknownOrThrow(): ChatMessageReactionUpdated.Unknown = this as dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated.Unknown -public inline fun TelegramMedia.ifTelegramMediaDocument(block: (TelegramMediaDocument) -> T): T? = telegramMediaDocumentOrNull() ?.let(block) +public inline fun ChatMessageReactionUpdated.ifUnknown(block: (ChatMessageReactionUpdated.Unknown) -> T): T? = unknownOrNull() ?.let(block) -public inline fun TelegramMedia.telegramMediaPhotoOrNull(): TelegramMediaPhoto? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaPhoto +public inline fun CommonSendInvoiceData.sendInvoiceOrNull(): SendInvoice? = this as? dev.inmo.tgbotapi.requests.send.payments.SendInvoice -public inline fun TelegramMedia.telegramMediaPhotoOrThrow(): TelegramMediaPhoto = this as dev.inmo.tgbotapi.types.media.TelegramMediaPhoto +public inline fun CommonSendInvoiceData.sendInvoiceOrThrow(): SendInvoice = this as dev.inmo.tgbotapi.requests.send.payments.SendInvoice -public inline fun TelegramMedia.ifTelegramMediaPhoto(block: (TelegramMediaPhoto) -> T): T? = telegramMediaPhotoOrNull() ?.let(block) +public inline fun CommonSendInvoiceData.ifSendInvoice(block: (SendInvoice) -> T): T? = sendInvoiceOrNull() ?.let(block) -public inline fun TelegramMedia.telegramMediaLivePhotoOrNull(): TelegramMediaLivePhoto? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaLivePhoto +public inline fun CommonSendInvoiceData.createInvoiceLinkOrNull(): CreateInvoiceLink? = this as? dev.inmo.tgbotapi.requests.send.payments.CreateInvoiceLink -public inline fun TelegramMedia.telegramMediaLivePhotoOrThrow(): TelegramMediaLivePhoto = this as dev.inmo.tgbotapi.types.media.TelegramMediaLivePhoto +public inline fun CommonSendInvoiceData.createInvoiceLinkOrThrow(): CreateInvoiceLink = this as dev.inmo.tgbotapi.requests.send.payments.CreateInvoiceLink -public inline fun TelegramMedia.ifTelegramMediaLivePhoto(block: (TelegramMediaLivePhoto) -> T): T? = telegramMediaLivePhotoOrNull() ?.let(block) +public inline fun CommonSendInvoiceData.ifCreateInvoiceLink(block: (CreateInvoiceLink) -> T): T? = createInvoiceLinkOrNull() ?.let(block) -public inline fun TelegramMedia.mediaGroupMemberTelegramMediaOrNull(): MediaGroupMemberTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.MediaGroupMemberTelegramMedia +public inline fun CommonSendInvoiceData.inputInvoiceMessageContentOrNull(): InputInvoiceMessageContent? = this as? dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputInvoiceMessageContent -public inline fun TelegramMedia.mediaGroupMemberTelegramMediaOrThrow(): MediaGroupMemberTelegramMedia = this as dev.inmo.tgbotapi.types.media.MediaGroupMemberTelegramMedia +public inline fun CommonSendInvoiceData.inputInvoiceMessageContentOrThrow(): InputInvoiceMessageContent = this as dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputInvoiceMessageContent -public inline fun TelegramMedia.ifMediaGroupMemberTelegramMedia(block: (MediaGroupMemberTelegramMedia) -> T): T? = mediaGroupMemberTelegramMediaOrNull() ?.let(block) +public inline fun CommonSendInvoiceData.ifInputInvoiceMessageContent(block: (InputInvoiceMessageContent) -> T): T? = inputInvoiceMessageContentOrNull() ?.let(block) -public inline fun TelegramMedia.audioMediaGroupMemberTelegramMediaOrNull(): AudioMediaGroupMemberTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.AudioMediaGroupMemberTelegramMedia +public inline fun OptionallyWithUser.pollAnswerOrNull(): PollAnswer? = this as? dev.inmo.tgbotapi.types.polls.PollAnswer -public inline fun TelegramMedia.audioMediaGroupMemberTelegramMediaOrThrow(): AudioMediaGroupMemberTelegramMedia = this as dev.inmo.tgbotapi.types.media.AudioMediaGroupMemberTelegramMedia +public inline fun OptionallyWithUser.pollAnswerOrThrow(): PollAnswer = this as dev.inmo.tgbotapi.types.polls.PollAnswer -public inline fun TelegramMedia.ifAudioMediaGroupMemberTelegramMedia(block: (AudioMediaGroupMemberTelegramMedia) -> T): T? = audioMediaGroupMemberTelegramMediaOrNull() ?.let(block) +public inline fun OptionallyWithUser.ifPollAnswer(block: (PollAnswer) -> T): T? = pollAnswerOrNull() ?.let(block) -public inline fun TelegramMedia.documentMediaGroupMemberTelegramMediaOrNull(): DocumentMediaGroupMemberTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.DocumentMediaGroupMemberTelegramMedia +public inline fun OptionallyWithUser.pollAnswerPublicOrNull(): PollAnswer.Public? = this as? dev.inmo.tgbotapi.types.polls.PollAnswer.Public -public inline fun TelegramMedia.documentMediaGroupMemberTelegramMediaOrThrow(): DocumentMediaGroupMemberTelegramMedia = this as dev.inmo.tgbotapi.types.media.DocumentMediaGroupMemberTelegramMedia +public inline fun OptionallyWithUser.pollAnswerPublicOrThrow(): PollAnswer.Public = this as dev.inmo.tgbotapi.types.polls.PollAnswer.Public -public inline fun TelegramMedia.ifDocumentMediaGroupMemberTelegramMedia(block: (DocumentMediaGroupMemberTelegramMedia) -> T): T? = documentMediaGroupMemberTelegramMediaOrNull() ?.let(block) +public inline fun OptionallyWithUser.ifPollAnswerPublic(block: (PollAnswer.Public) -> T): T? = pollAnswerPublicOrNull() ?.let(block) -public inline fun TelegramMedia.visualMediaGroupMemberTelegramMediaOrNull(): VisualMediaGroupMemberTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.VisualMediaGroupMemberTelegramMedia +public inline fun OptionallyWithUser.pollAnswerAnonymousOrNull(): PollAnswer.Anonymous? = this as? dev.inmo.tgbotapi.types.polls.PollAnswer.Anonymous -public inline fun TelegramMedia.visualMediaGroupMemberTelegramMediaOrThrow(): VisualMediaGroupMemberTelegramMedia = this as dev.inmo.tgbotapi.types.media.VisualMediaGroupMemberTelegramMedia +public inline fun OptionallyWithUser.pollAnswerAnonymousOrThrow(): PollAnswer.Anonymous = this as dev.inmo.tgbotapi.types.polls.PollAnswer.Anonymous -public inline fun TelegramMedia.ifVisualMediaGroupMemberTelegramMedia(block: (VisualMediaGroupMemberTelegramMedia) -> T): T? = visualMediaGroupMemberTelegramMediaOrNull() ?.let(block) - -public inline fun TelegramMedia.telegramMediaAudioOrNull(): TelegramMediaAudio? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaAudio - -public inline fun TelegramMedia.telegramMediaAudioOrThrow(): TelegramMediaAudio = this as dev.inmo.tgbotapi.types.media.TelegramMediaAudio - -public inline fun TelegramMedia.ifTelegramMediaAudio(block: (TelegramMediaAudio) -> T): T? = telegramMediaAudioOrNull() ?.let(block) - -public inline fun TelegramMedia.telegramPaidMediaVideoOrNull(): TelegramPaidMediaVideo? = this as? dev.inmo.tgbotapi.types.media.TelegramPaidMediaVideo - -public inline fun TelegramMedia.telegramPaidMediaVideoOrThrow(): TelegramPaidMediaVideo = this as dev.inmo.tgbotapi.types.media.TelegramPaidMediaVideo - -public inline fun TelegramMedia.ifTelegramPaidMediaVideo(block: (TelegramPaidMediaVideo) -> T): T? = telegramPaidMediaVideoOrNull() ?.let(block) - -public inline fun TelegramMedia.telegramMediaAnimationOrNull(): TelegramMediaAnimation? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaAnimation - -public inline fun TelegramMedia.telegramMediaAnimationOrThrow(): TelegramMediaAnimation = this as dev.inmo.tgbotapi.types.media.TelegramMediaAnimation - -public inline fun TelegramMedia.ifTelegramMediaAnimation(block: (TelegramMediaAnimation) -> T): T? = telegramMediaAnimationOrNull() ?.let(block) - -public inline fun TelegramMedia.coveredTelegramMediaOrNull(): CoveredTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.CoveredTelegramMedia - -public inline fun TelegramMedia.coveredTelegramMediaOrThrow(): CoveredTelegramMedia = this as dev.inmo.tgbotapi.types.media.CoveredTelegramMedia - -public inline fun TelegramMedia.ifCoveredTelegramMedia(block: (CoveredTelegramMedia) -> T): T? = coveredTelegramMediaOrNull() ?.let(block) - -public inline fun TelegramMedia.telegramFreeMediaOrNull(): TelegramFreeMedia? = this as? dev.inmo.tgbotapi.types.media.TelegramFreeMedia - -public inline fun TelegramMedia.telegramFreeMediaOrThrow(): TelegramFreeMedia = this as dev.inmo.tgbotapi.types.media.TelegramFreeMedia - -public inline fun TelegramMedia.ifTelegramFreeMedia(block: (TelegramFreeMedia) -> T): T? = telegramFreeMediaOrNull() ?.let(block) - -public inline fun TelegramMedia.spoilerableTelegramMediaOrNull(): SpoilerableTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.SpoilerableTelegramMedia - -public inline fun TelegramMedia.spoilerableTelegramMediaOrThrow(): SpoilerableTelegramMedia = this as dev.inmo.tgbotapi.types.media.SpoilerableTelegramMedia - -public inline fun TelegramMedia.ifSpoilerableTelegramMedia(block: (SpoilerableTelegramMedia) -> T): T? = spoilerableTelegramMediaOrNull() ?.let(block) - -public inline fun TelegramMedia.sizedTelegramMediaOrNull(): SizedTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.SizedTelegramMedia - -public inline fun TelegramMedia.sizedTelegramMediaOrThrow(): SizedTelegramMedia = this as dev.inmo.tgbotapi.types.media.SizedTelegramMedia - -public inline fun TelegramMedia.ifSizedTelegramMedia(block: (SizedTelegramMedia) -> T): T? = sizedTelegramMediaOrNull() ?.let(block) - -public inline fun TelegramMedia.withCustomStartTelegramMediaOrNull(): WithCustomStartTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.WithCustomStartTelegramMedia - -public inline fun TelegramMedia.withCustomStartTelegramMediaOrThrow(): WithCustomStartTelegramMedia = this as dev.inmo.tgbotapi.types.media.WithCustomStartTelegramMedia - -public inline fun TelegramMedia.ifWithCustomStartTelegramMedia(block: (WithCustomStartTelegramMedia) -> T): T? = withCustomStartTelegramMediaOrNull() ?.let(block) - -public inline fun TelegramMedia.withCustomizableCaptionTelegramMediaOrNull(): WithCustomizableCaptionTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.WithCustomizableCaptionTelegramMedia - -public inline fun TelegramMedia.withCustomizableCaptionTelegramMediaOrThrow(): WithCustomizableCaptionTelegramMedia = this as dev.inmo.tgbotapi.types.media.WithCustomizableCaptionTelegramMedia - -public inline fun TelegramMedia.ifWithCustomizableCaptionTelegramMedia(block: (WithCustomizableCaptionTelegramMedia) -> T): T? = withCustomizableCaptionTelegramMediaOrNull() ?.let(block) - -public inline fun TelegramMedia.thumbedTelegramMediaOrNull(): ThumbedTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.ThumbedTelegramMedia - -public inline fun TelegramMedia.thumbedTelegramMediaOrThrow(): ThumbedTelegramMedia = this as dev.inmo.tgbotapi.types.media.ThumbedTelegramMedia - -public inline fun TelegramMedia.ifThumbedTelegramMedia(block: (ThumbedTelegramMedia) -> T): T? = thumbedTelegramMediaOrNull() ?.let(block) - -public inline fun TelegramMedia.telegramMediaStickerOrNull(): TelegramMediaSticker? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaSticker - -public inline fun TelegramMedia.telegramMediaStickerOrThrow(): TelegramMediaSticker = this as dev.inmo.tgbotapi.types.media.TelegramMediaSticker - -public inline fun TelegramMedia.ifTelegramMediaSticker(block: (TelegramMediaSticker) -> T): T? = telegramMediaStickerOrNull() ?.let(block) - -public inline fun TelegramMedia.telegramMediaVideoOrNull(): TelegramMediaVideo? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaVideo - -public inline fun TelegramMedia.telegramMediaVideoOrThrow(): TelegramMediaVideo = this as dev.inmo.tgbotapi.types.media.TelegramMediaVideo - -public inline fun TelegramMedia.ifTelegramMediaVideo(block: (TelegramMediaVideo) -> T): T? = telegramMediaVideoOrNull() ?.let(block) - -public inline fun TelegramMedia.telegramPaidMediaOrNull(): TelegramPaidMedia? = this as? dev.inmo.tgbotapi.types.media.TelegramPaidMedia - -public inline fun TelegramMedia.telegramPaidMediaOrThrow(): TelegramPaidMedia = this as dev.inmo.tgbotapi.types.media.TelegramPaidMedia - -public inline fun TelegramMedia.ifTelegramPaidMedia(block: (TelegramPaidMedia) -> T): T? = telegramPaidMediaOrNull() ?.let(block) - -public inline fun TelegramMedia.visualTelegramPaidMediaOrNull(): VisualTelegramPaidMedia? = this as? dev.inmo.tgbotapi.types.media.VisualTelegramPaidMedia - -public inline fun TelegramMedia.visualTelegramPaidMediaOrThrow(): VisualTelegramPaidMedia = this as dev.inmo.tgbotapi.types.media.VisualTelegramPaidMedia - -public inline fun TelegramMedia.ifVisualTelegramPaidMedia(block: (VisualTelegramPaidMedia) -> T): T? = visualTelegramPaidMediaOrNull() ?.let(block) - -public inline fun TelegramMedia.duratedTelegramMediaOrNull(): DuratedTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.DuratedTelegramMedia - -public inline fun TelegramMedia.duratedTelegramMediaOrThrow(): DuratedTelegramMedia = this as dev.inmo.tgbotapi.types.media.DuratedTelegramMedia - -public inline fun TelegramMedia.ifDuratedTelegramMedia(block: (DuratedTelegramMedia) -> T): T? = duratedTelegramMediaOrNull() ?.let(block) - -public inline fun TelegramMedia.titledTelegramMediaOrNull(): TitledTelegramMedia? = this as? dev.inmo.tgbotapi.types.media.TitledTelegramMedia - -public inline fun TelegramMedia.titledTelegramMediaOrThrow(): TitledTelegramMedia = this as dev.inmo.tgbotapi.types.media.TitledTelegramMedia - -public inline fun TelegramMedia.ifTitledTelegramMedia(block: (TitledTelegramMedia) -> T): T? = titledTelegramMediaOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.voiceFileOrNull(): VoiceFile? = this as? dev.inmo.tgbotapi.types.files.VoiceFile - -public inline fun BaseTelegramMediaFile.voiceFileOrThrow(): VoiceFile = this as dev.inmo.tgbotapi.types.files.VoiceFile - -public inline fun BaseTelegramMediaFile.ifVoiceFile(block: (VoiceFile) -> T): T? = voiceFileOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.audioFileOrNull(): AudioFile? = this as? dev.inmo.tgbotapi.types.files.AudioFile - -public inline fun BaseTelegramMediaFile.audioFileOrThrow(): AudioFile = this as dev.inmo.tgbotapi.types.files.AudioFile - -public inline fun BaseTelegramMediaFile.ifAudioFile(block: (AudioFile) -> T): T? = audioFileOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.videoQualityOrNull(): VideoQuality? = this as? dev.inmo.tgbotapi.types.files.VideoQuality - -public inline fun BaseTelegramMediaFile.videoQualityOrThrow(): VideoQuality = this as dev.inmo.tgbotapi.types.files.VideoQuality - -public inline fun BaseTelegramMediaFile.ifVideoQuality(block: (VideoQuality) -> T): T? = videoQualityOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.videoNoteFileOrNull(): VideoNoteFile? = this as? dev.inmo.tgbotapi.types.files.VideoNoteFile - -public inline fun BaseTelegramMediaFile.videoNoteFileOrThrow(): VideoNoteFile = this as dev.inmo.tgbotapi.types.files.VideoNoteFile - -public inline fun BaseTelegramMediaFile.ifVideoNoteFile(block: (VideoNoteFile) -> T): T? = videoNoteFileOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.mediaContentVariantOrNull(): MediaContentVariant? = this as? dev.inmo.tgbotapi.types.files.MediaContentVariant - -public inline fun BaseTelegramMediaFile.mediaContentVariantOrThrow(): MediaContentVariant = this as dev.inmo.tgbotapi.types.files.MediaContentVariant - -public inline fun BaseTelegramMediaFile.ifMediaContentVariant(block: (MediaContentVariant) -> T): T? = mediaContentVariantOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.fileOrNull(): File? = this as? dev.inmo.tgbotapi.types.files.File - -public inline fun BaseTelegramMediaFile.fileOrThrow(): File = this as dev.inmo.tgbotapi.types.files.File - -public inline fun BaseTelegramMediaFile.ifFile(block: (File) -> T): T? = fileOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.usefulAsPaidMediaFileOrNull(): UsefulAsPaidMediaFile? = this as? dev.inmo.tgbotapi.types.files.UsefulAsPaidMediaFile - -public inline fun BaseTelegramMediaFile.usefulAsPaidMediaFileOrThrow(): UsefulAsPaidMediaFile = this as dev.inmo.tgbotapi.types.files.UsefulAsPaidMediaFile - -public inline fun BaseTelegramMediaFile.ifUsefulAsPaidMediaFile(block: (UsefulAsPaidMediaFile) -> T): T? = usefulAsPaidMediaFileOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.animationFileOrNull(): AnimationFile? = this as? dev.inmo.tgbotapi.types.files.AnimationFile - -public inline fun BaseTelegramMediaFile.animationFileOrThrow(): AnimationFile = this as dev.inmo.tgbotapi.types.files.AnimationFile - -public inline fun BaseTelegramMediaFile.ifAnimationFile(block: (AnimationFile) -> T): T? = animationFileOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.pathedFileOrNull(): PathedFile? = this as? dev.inmo.tgbotapi.types.files.PathedFile - -public inline fun BaseTelegramMediaFile.pathedFileOrThrow(): PathedFile = this as dev.inmo.tgbotapi.types.files.PathedFile - -public inline fun BaseTelegramMediaFile.ifPathedFile(block: (PathedFile) -> T): T? = pathedFileOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.playableMediaFileOrNull(): PlayableMediaFile? = this as? dev.inmo.tgbotapi.types.files.PlayableMediaFile - -public inline fun BaseTelegramMediaFile.playableMediaFileOrThrow(): PlayableMediaFile = this as dev.inmo.tgbotapi.types.files.PlayableMediaFile - -public inline fun BaseTelegramMediaFile.ifPlayableMediaFile(block: (PlayableMediaFile) -> T): T? = playableMediaFileOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.coveredMediaFileOrNull(): CoveredMediaFile? = this as? dev.inmo.tgbotapi.types.files.CoveredMediaFile - -public inline fun BaseTelegramMediaFile.coveredMediaFileOrThrow(): CoveredMediaFile = this as dev.inmo.tgbotapi.types.files.CoveredMediaFile - -public inline fun BaseTelegramMediaFile.ifCoveredMediaFile(block: (CoveredMediaFile) -> T): T? = coveredMediaFileOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.telegramMediaFileOrNull(): TelegramMediaFile? = this as? dev.inmo.tgbotapi.types.files.TelegramMediaFile - -public inline fun BaseTelegramMediaFile.telegramMediaFileOrThrow(): TelegramMediaFile = this as dev.inmo.tgbotapi.types.files.TelegramMediaFile - -public inline fun BaseTelegramMediaFile.ifTelegramMediaFile(block: (TelegramMediaFile) -> T): T? = telegramMediaFileOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.livePhotoFileOrNull(): LivePhotoFile? = this as? dev.inmo.tgbotapi.types.files.LivePhotoFile - -public inline fun BaseTelegramMediaFile.livePhotoFileOrThrow(): LivePhotoFile = this as dev.inmo.tgbotapi.types.files.LivePhotoFile - -public inline fun BaseTelegramMediaFile.ifLivePhotoFile(block: (LivePhotoFile) -> T): T? = livePhotoFileOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.sizedMediaFileOrNull(): SizedMediaFile? = this as? dev.inmo.tgbotapi.types.files.SizedMediaFile - -public inline fun BaseTelegramMediaFile.sizedMediaFileOrThrow(): SizedMediaFile = this as dev.inmo.tgbotapi.types.files.SizedMediaFile - -public inline fun BaseTelegramMediaFile.ifSizedMediaFile(block: (SizedMediaFile) -> T): T? = sizedMediaFileOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.documentFileOrNull(): DocumentFile? = this as? dev.inmo.tgbotapi.types.files.DocumentFile - -public inline fun BaseTelegramMediaFile.documentFileOrThrow(): DocumentFile = this as dev.inmo.tgbotapi.types.files.DocumentFile - -public inline fun BaseTelegramMediaFile.ifDocumentFile(block: (DocumentFile) -> T): T? = documentFileOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.photoFileOrNull(): PhotoFile? = this as? dev.inmo.tgbotapi.types.files.PhotoFile - -public inline fun BaseTelegramMediaFile.photoFileOrThrow(): PhotoFile = this as dev.inmo.tgbotapi.types.files.PhotoFile - -public inline fun BaseTelegramMediaFile.ifPhotoFile(block: (PhotoFile) -> T): T? = photoFileOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.photoSizeOrNull(): PhotoSize? = this as? dev.inmo.tgbotapi.types.files.PhotoSize - -public inline fun BaseTelegramMediaFile.photoSizeOrThrow(): PhotoSize = this as dev.inmo.tgbotapi.types.files.PhotoSize - -public inline fun BaseTelegramMediaFile.ifPhotoSize(block: (PhotoSize) -> T): T? = photoSizeOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.videoFileOrNull(): VideoFile? = this as? dev.inmo.tgbotapi.types.files.VideoFile - -public inline fun BaseTelegramMediaFile.videoFileOrThrow(): VideoFile = this as dev.inmo.tgbotapi.types.files.VideoFile - -public inline fun BaseTelegramMediaFile.ifVideoFile(block: (VideoFile) -> T): T? = videoFileOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.mimedMediaFileOrNull(): MimedMediaFile? = this as? dev.inmo.tgbotapi.types.files.MimedMediaFile - -public inline fun BaseTelegramMediaFile.mimedMediaFileOrThrow(): MimedMediaFile = this as dev.inmo.tgbotapi.types.files.MimedMediaFile - -public inline fun BaseTelegramMediaFile.ifMimedMediaFile(block: (MimedMediaFile) -> T): T? = mimedMediaFileOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.thumbedMediaFileOrNull(): ThumbedMediaFile? = this as? dev.inmo.tgbotapi.types.files.ThumbedMediaFile - -public inline fun BaseTelegramMediaFile.thumbedMediaFileOrThrow(): ThumbedMediaFile = this as dev.inmo.tgbotapi.types.files.ThumbedMediaFile - -public inline fun BaseTelegramMediaFile.ifThumbedMediaFile(block: (ThumbedMediaFile) -> T): T? = thumbedMediaFileOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.passportFileOrNull(): PassportFile? = this as? dev.inmo.tgbotapi.types.files.PassportFile - -public inline fun BaseTelegramMediaFile.passportFileOrThrow(): PassportFile = this as dev.inmo.tgbotapi.types.files.PassportFile - -public inline fun BaseTelegramMediaFile.ifPassportFile(block: (PassportFile) -> T): T? = passportFileOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.stickerOrNull(): Sticker? = this as? dev.inmo.tgbotapi.types.files.Sticker - -public inline fun BaseTelegramMediaFile.stickerOrThrow(): Sticker = this as dev.inmo.tgbotapi.types.files.Sticker - -public inline fun BaseTelegramMediaFile.ifSticker(block: (Sticker) -> T): T? = stickerOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.videoStickerOrNull(): VideoSticker? = this as? dev.inmo.tgbotapi.types.files.VideoSticker - -public inline fun BaseTelegramMediaFile.videoStickerOrThrow(): VideoSticker = this as dev.inmo.tgbotapi.types.files.VideoSticker - -public inline fun BaseTelegramMediaFile.ifVideoSticker(block: (VideoSticker) -> T): T? = videoStickerOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.animatedStickerOrNull(): AnimatedSticker? = this as? dev.inmo.tgbotapi.types.files.AnimatedSticker - -public inline fun BaseTelegramMediaFile.animatedStickerOrThrow(): AnimatedSticker = this as dev.inmo.tgbotapi.types.files.AnimatedSticker - -public inline fun BaseTelegramMediaFile.ifAnimatedSticker(block: (AnimatedSticker) -> T): T? = animatedStickerOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.regularStickerOrNull(): RegularSticker? = this as? dev.inmo.tgbotapi.types.files.RegularSticker - -public inline fun BaseTelegramMediaFile.regularStickerOrThrow(): RegularSticker = this as dev.inmo.tgbotapi.types.files.RegularSticker - -public inline fun BaseTelegramMediaFile.ifRegularSticker(block: (RegularSticker) -> T): T? = regularStickerOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.regularSimpleStickerOrNull(): RegularSimpleSticker? = this as? dev.inmo.tgbotapi.types.files.RegularSimpleSticker - -public inline fun BaseTelegramMediaFile.regularSimpleStickerOrThrow(): RegularSimpleSticker = this as dev.inmo.tgbotapi.types.files.RegularSimpleSticker - -public inline fun BaseTelegramMediaFile.ifRegularSimpleSticker(block: (RegularSimpleSticker) -> T): T? = regularSimpleStickerOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.regularAnimatedStickerOrNull(): RegularAnimatedSticker? = this as? dev.inmo.tgbotapi.types.files.RegularAnimatedSticker - -public inline fun BaseTelegramMediaFile.regularAnimatedStickerOrThrow(): RegularAnimatedSticker = this as dev.inmo.tgbotapi.types.files.RegularAnimatedSticker - -public inline fun BaseTelegramMediaFile.ifRegularAnimatedSticker(block: (RegularAnimatedSticker) -> T): T? = regularAnimatedStickerOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.regularVideoStickerOrNull(): RegularVideoSticker? = this as? dev.inmo.tgbotapi.types.files.RegularVideoSticker - -public inline fun BaseTelegramMediaFile.regularVideoStickerOrThrow(): RegularVideoSticker = this as dev.inmo.tgbotapi.types.files.RegularVideoSticker - -public inline fun BaseTelegramMediaFile.ifRegularVideoSticker(block: (RegularVideoSticker) -> T): T? = regularVideoStickerOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.maskStickerOrNull(): MaskSticker? = this as? dev.inmo.tgbotapi.types.files.MaskSticker - -public inline fun BaseTelegramMediaFile.maskStickerOrThrow(): MaskSticker = this as dev.inmo.tgbotapi.types.files.MaskSticker - -public inline fun BaseTelegramMediaFile.ifMaskSticker(block: (MaskSticker) -> T): T? = maskStickerOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.maskSimpleStickerOrNull(): MaskSimpleSticker? = this as? dev.inmo.tgbotapi.types.files.MaskSimpleSticker - -public inline fun BaseTelegramMediaFile.maskSimpleStickerOrThrow(): MaskSimpleSticker = this as dev.inmo.tgbotapi.types.files.MaskSimpleSticker - -public inline fun BaseTelegramMediaFile.ifMaskSimpleSticker(block: (MaskSimpleSticker) -> T): T? = maskSimpleStickerOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.maskAnimatedStickerOrNull(): MaskAnimatedSticker? = this as? dev.inmo.tgbotapi.types.files.MaskAnimatedSticker - -public inline fun BaseTelegramMediaFile.maskAnimatedStickerOrThrow(): MaskAnimatedSticker = this as dev.inmo.tgbotapi.types.files.MaskAnimatedSticker - -public inline fun BaseTelegramMediaFile.ifMaskAnimatedSticker(block: (MaskAnimatedSticker) -> T): T? = maskAnimatedStickerOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.maskVideoStickerOrNull(): MaskVideoSticker? = this as? dev.inmo.tgbotapi.types.files.MaskVideoSticker - -public inline fun BaseTelegramMediaFile.maskVideoStickerOrThrow(): MaskVideoSticker = this as dev.inmo.tgbotapi.types.files.MaskVideoSticker - -public inline fun BaseTelegramMediaFile.ifMaskVideoSticker(block: (MaskVideoSticker) -> T): T? = maskVideoStickerOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.customEmojiStickerOrNull(): CustomEmojiSticker? = this as? dev.inmo.tgbotapi.types.files.CustomEmojiSticker - -public inline fun BaseTelegramMediaFile.customEmojiStickerOrThrow(): CustomEmojiSticker = this as dev.inmo.tgbotapi.types.files.CustomEmojiSticker - -public inline fun BaseTelegramMediaFile.ifCustomEmojiSticker(block: (CustomEmojiSticker) -> T): T? = customEmojiStickerOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.customEmojiSimpleStickerOrNull(): CustomEmojiSimpleSticker? = this as? dev.inmo.tgbotapi.types.files.CustomEmojiSimpleSticker - -public inline fun BaseTelegramMediaFile.customEmojiSimpleStickerOrThrow(): CustomEmojiSimpleSticker = this as dev.inmo.tgbotapi.types.files.CustomEmojiSimpleSticker - -public inline fun BaseTelegramMediaFile.ifCustomEmojiSimpleSticker(block: (CustomEmojiSimpleSticker) -> T): T? = customEmojiSimpleStickerOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.customEmojiAnimatedStickerOrNull(): CustomEmojiAnimatedSticker? = this as? dev.inmo.tgbotapi.types.files.CustomEmojiAnimatedSticker - -public inline fun BaseTelegramMediaFile.customEmojiAnimatedStickerOrThrow(): CustomEmojiAnimatedSticker = this as dev.inmo.tgbotapi.types.files.CustomEmojiAnimatedSticker - -public inline fun BaseTelegramMediaFile.ifCustomEmojiAnimatedSticker(block: (CustomEmojiAnimatedSticker) -> T): T? = customEmojiAnimatedStickerOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.customEmojiVideoStickerOrNull(): CustomEmojiVideoSticker? = this as? dev.inmo.tgbotapi.types.files.CustomEmojiVideoSticker - -public inline fun BaseTelegramMediaFile.customEmojiVideoStickerOrThrow(): CustomEmojiVideoSticker = this as dev.inmo.tgbotapi.types.files.CustomEmojiVideoSticker - -public inline fun BaseTelegramMediaFile.ifCustomEmojiVideoSticker(block: (CustomEmojiVideoSticker) -> T): T? = customEmojiVideoStickerOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.unknownStickerOrNull(): UnknownSticker? = this as? dev.inmo.tgbotapi.types.files.UnknownSticker - -public inline fun BaseTelegramMediaFile.unknownStickerOrThrow(): UnknownSticker = this as dev.inmo.tgbotapi.types.files.UnknownSticker - -public inline fun BaseTelegramMediaFile.ifUnknownSticker(block: (UnknownSticker) -> T): T? = unknownStickerOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.staticLocationOrNull(): StaticLocation? = this as? dev.inmo.tgbotapi.types.location.StaticLocation - -public inline fun BaseTelegramMediaFile.staticLocationOrThrow(): StaticLocation = this as dev.inmo.tgbotapi.types.location.StaticLocation - -public inline fun BaseTelegramMediaFile.ifStaticLocation(block: (StaticLocation) -> T): T? = staticLocationOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.pollMediaOrNull(): PollMedia? = this as? dev.inmo.tgbotapi.types.media.PollMedia - -public inline fun BaseTelegramMediaFile.pollMediaOrThrow(): PollMedia = this as dev.inmo.tgbotapi.types.media.PollMedia - -public inline fun BaseTelegramMediaFile.ifPollMedia(block: (PollMedia) -> T): T? = pollMediaOrNull() ?.let(block) - -public inline fun BaseTelegramMediaFile.venueOrNull(): Venue? = this as? dev.inmo.tgbotapi.types.venue.Venue - -public inline fun BaseTelegramMediaFile.venueOrThrow(): Venue = this as dev.inmo.tgbotapi.types.venue.Venue - -public inline fun BaseTelegramMediaFile.ifVenue(block: (Venue) -> T): T? = venueOrNull() ?.let(block) - -public inline fun InputPollOptionMedia.telegramMediaPhotoOrNull(): TelegramMediaPhoto? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaPhoto - -public inline fun InputPollOptionMedia.telegramMediaPhotoOrThrow(): TelegramMediaPhoto = this as dev.inmo.tgbotapi.types.media.TelegramMediaPhoto - -public inline fun InputPollOptionMedia.ifTelegramMediaPhoto(block: (TelegramMediaPhoto) -> T): T? = telegramMediaPhotoOrNull() ?.let(block) - -public inline fun InputPollOptionMedia.telegramMediaLivePhotoOrNull(): TelegramMediaLivePhoto? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaLivePhoto - -public inline fun InputPollOptionMedia.telegramMediaLivePhotoOrThrow(): TelegramMediaLivePhoto = this as dev.inmo.tgbotapi.types.media.TelegramMediaLivePhoto - -public inline fun InputPollOptionMedia.ifTelegramMediaLivePhoto(block: (TelegramMediaLivePhoto) -> T): T? = telegramMediaLivePhotoOrNull() ?.let(block) - -public inline fun InputPollOptionMedia.telegramMediaLocationOrNull(): TelegramMediaLocation? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaLocation - -public inline fun InputPollOptionMedia.telegramMediaLocationOrThrow(): TelegramMediaLocation = this as dev.inmo.tgbotapi.types.media.TelegramMediaLocation - -public inline fun InputPollOptionMedia.ifTelegramMediaLocation(block: (TelegramMediaLocation) -> T): T? = telegramMediaLocationOrNull() ?.let(block) - -public inline fun InputPollOptionMedia.telegramMediaAnimationOrNull(): TelegramMediaAnimation? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaAnimation - -public inline fun InputPollOptionMedia.telegramMediaAnimationOrThrow(): TelegramMediaAnimation = this as dev.inmo.tgbotapi.types.media.TelegramMediaAnimation - -public inline fun InputPollOptionMedia.ifTelegramMediaAnimation(block: (TelegramMediaAnimation) -> T): T? = telegramMediaAnimationOrNull() ?.let(block) - -public inline fun InputPollOptionMedia.telegramMediaStickerOrNull(): TelegramMediaSticker? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaSticker - -public inline fun InputPollOptionMedia.telegramMediaStickerOrThrow(): TelegramMediaSticker = this as dev.inmo.tgbotapi.types.media.TelegramMediaSticker - -public inline fun InputPollOptionMedia.ifTelegramMediaSticker(block: (TelegramMediaSticker) -> T): T? = telegramMediaStickerOrNull() ?.let(block) - -public inline fun InputPollOptionMedia.telegramMediaVideoOrNull(): TelegramMediaVideo? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaVideo - -public inline fun InputPollOptionMedia.telegramMediaVideoOrThrow(): TelegramMediaVideo = this as dev.inmo.tgbotapi.types.media.TelegramMediaVideo - -public inline fun InputPollOptionMedia.ifTelegramMediaVideo(block: (TelegramMediaVideo) -> T): T? = telegramMediaVideoOrNull() ?.let(block) - -public inline fun InputPollOptionMedia.telegramMediaVenueOrNull(): TelegramMediaVenue? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaVenue - -public inline fun InputPollOptionMedia.telegramMediaVenueOrThrow(): TelegramMediaVenue = this as dev.inmo.tgbotapi.types.media.TelegramMediaVenue - -public inline fun InputPollOptionMedia.ifTelegramMediaVenue(block: (TelegramMediaVenue) -> T): T? = telegramMediaVenueOrNull() ?.let(block) - -public inline fun InputPollMedia.telegramMediaDocumentOrNull(): TelegramMediaDocument? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaDocument - -public inline fun InputPollMedia.telegramMediaDocumentOrThrow(): TelegramMediaDocument = this as dev.inmo.tgbotapi.types.media.TelegramMediaDocument - -public inline fun InputPollMedia.ifTelegramMediaDocument(block: (TelegramMediaDocument) -> T): T? = telegramMediaDocumentOrNull() ?.let(block) - -public inline fun InputPollMedia.telegramMediaPhotoOrNull(): TelegramMediaPhoto? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaPhoto - -public inline fun InputPollMedia.telegramMediaPhotoOrThrow(): TelegramMediaPhoto = this as dev.inmo.tgbotapi.types.media.TelegramMediaPhoto - -public inline fun InputPollMedia.ifTelegramMediaPhoto(block: (TelegramMediaPhoto) -> T): T? = telegramMediaPhotoOrNull() ?.let(block) - -public inline fun InputPollMedia.telegramMediaLivePhotoOrNull(): TelegramMediaLivePhoto? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaLivePhoto - -public inline fun InputPollMedia.telegramMediaLivePhotoOrThrow(): TelegramMediaLivePhoto = this as dev.inmo.tgbotapi.types.media.TelegramMediaLivePhoto - -public inline fun InputPollMedia.ifTelegramMediaLivePhoto(block: (TelegramMediaLivePhoto) -> T): T? = telegramMediaLivePhotoOrNull() ?.let(block) - -public inline fun InputPollMedia.telegramMediaLocationOrNull(): TelegramMediaLocation? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaLocation - -public inline fun InputPollMedia.telegramMediaLocationOrThrow(): TelegramMediaLocation = this as dev.inmo.tgbotapi.types.media.TelegramMediaLocation - -public inline fun InputPollMedia.ifTelegramMediaLocation(block: (TelegramMediaLocation) -> T): T? = telegramMediaLocationOrNull() ?.let(block) - -public inline fun InputPollMedia.telegramMediaAudioOrNull(): TelegramMediaAudio? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaAudio - -public inline fun InputPollMedia.telegramMediaAudioOrThrow(): TelegramMediaAudio = this as dev.inmo.tgbotapi.types.media.TelegramMediaAudio - -public inline fun InputPollMedia.ifTelegramMediaAudio(block: (TelegramMediaAudio) -> T): T? = telegramMediaAudioOrNull() ?.let(block) - -public inline fun InputPollMedia.telegramMediaAnimationOrNull(): TelegramMediaAnimation? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaAnimation - -public inline fun InputPollMedia.telegramMediaAnimationOrThrow(): TelegramMediaAnimation = this as dev.inmo.tgbotapi.types.media.TelegramMediaAnimation - -public inline fun InputPollMedia.ifTelegramMediaAnimation(block: (TelegramMediaAnimation) -> T): T? = telegramMediaAnimationOrNull() ?.let(block) - -public inline fun InputPollMedia.telegramMediaVideoOrNull(): TelegramMediaVideo? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaVideo - -public inline fun InputPollMedia.telegramMediaVideoOrThrow(): TelegramMediaVideo = this as dev.inmo.tgbotapi.types.media.TelegramMediaVideo - -public inline fun InputPollMedia.ifTelegramMediaVideo(block: (TelegramMediaVideo) -> T): T? = telegramMediaVideoOrNull() ?.let(block) - -public inline fun InputPollMedia.telegramMediaVenueOrNull(): TelegramMediaVenue? = this as? dev.inmo.tgbotapi.types.media.TelegramMediaVenue - -public inline fun InputPollMedia.telegramMediaVenueOrThrow(): TelegramMediaVenue = this as dev.inmo.tgbotapi.types.media.TelegramMediaVenue - -public inline fun InputPollMedia.ifTelegramMediaVenue(block: (TelegramMediaVenue) -> T): T? = telegramMediaVenueOrNull() ?.let(block) - -public inline fun DiceAnimationType.cubeDiceAnimationTypeOrNull(): CubeDiceAnimationType? = this as? dev.inmo.tgbotapi.types.dice.CubeDiceAnimationType - -public inline fun DiceAnimationType.cubeDiceAnimationTypeOrThrow(): CubeDiceAnimationType = this as dev.inmo.tgbotapi.types.dice.CubeDiceAnimationType - -public inline fun DiceAnimationType.ifCubeDiceAnimationType(block: (CubeDiceAnimationType) -> T): T? = cubeDiceAnimationTypeOrNull() ?.let(block) - -public inline fun DiceAnimationType.dartsDiceAnimationTypeOrNull(): DartsDiceAnimationType? = this as? dev.inmo.tgbotapi.types.dice.DartsDiceAnimationType - -public inline fun DiceAnimationType.dartsDiceAnimationTypeOrThrow(): DartsDiceAnimationType = this as dev.inmo.tgbotapi.types.dice.DartsDiceAnimationType - -public inline fun DiceAnimationType.ifDartsDiceAnimationType(block: (DartsDiceAnimationType) -> T): T? = dartsDiceAnimationTypeOrNull() ?.let(block) - -public inline fun DiceAnimationType.basketballDiceAnimationTypeOrNull(): BasketballDiceAnimationType? = this as? dev.inmo.tgbotapi.types.dice.BasketballDiceAnimationType - -public inline fun DiceAnimationType.basketballDiceAnimationTypeOrThrow(): BasketballDiceAnimationType = this as dev.inmo.tgbotapi.types.dice.BasketballDiceAnimationType - -public inline fun DiceAnimationType.ifBasketballDiceAnimationType(block: (BasketballDiceAnimationType) -> T): T? = basketballDiceAnimationTypeOrNull() ?.let(block) - -public inline fun DiceAnimationType.footballDiceAnimationTypeOrNull(): FootballDiceAnimationType? = this as? dev.inmo.tgbotapi.types.dice.FootballDiceAnimationType - -public inline fun DiceAnimationType.footballDiceAnimationTypeOrThrow(): FootballDiceAnimationType = this as dev.inmo.tgbotapi.types.dice.FootballDiceAnimationType - -public inline fun DiceAnimationType.ifFootballDiceAnimationType(block: (FootballDiceAnimationType) -> T): T? = footballDiceAnimationTypeOrNull() ?.let(block) - -public inline fun DiceAnimationType.bowlingDiceAnimationTypeOrNull(): BowlingDiceAnimationType? = this as? dev.inmo.tgbotapi.types.dice.BowlingDiceAnimationType - -public inline fun DiceAnimationType.bowlingDiceAnimationTypeOrThrow(): BowlingDiceAnimationType = this as dev.inmo.tgbotapi.types.dice.BowlingDiceAnimationType - -public inline fun DiceAnimationType.ifBowlingDiceAnimationType(block: (BowlingDiceAnimationType) -> T): T? = bowlingDiceAnimationTypeOrNull() ?.let(block) - -public inline fun DiceAnimationType.slotMachineDiceAnimationTypeOrNull(): SlotMachineDiceAnimationType? = this as? dev.inmo.tgbotapi.types.dice.SlotMachineDiceAnimationType - -public inline fun DiceAnimationType.slotMachineDiceAnimationTypeOrThrow(): SlotMachineDiceAnimationType = this as dev.inmo.tgbotapi.types.dice.SlotMachineDiceAnimationType - -public inline fun DiceAnimationType.ifSlotMachineDiceAnimationType(block: (SlotMachineDiceAnimationType) -> T): T? = slotMachineDiceAnimationTypeOrNull() ?.let(block) - -public inline fun DiceAnimationType.customDiceAnimationTypeOrNull(): CustomDiceAnimationType? = this as? dev.inmo.tgbotapi.types.dice.CustomDiceAnimationType - -public inline fun DiceAnimationType.customDiceAnimationTypeOrThrow(): CustomDiceAnimationType = this as dev.inmo.tgbotapi.types.dice.CustomDiceAnimationType - -public inline fun DiceAnimationType.ifCustomDiceAnimationType(block: (CustomDiceAnimationType) -> T): T? = customDiceAnimationTypeOrNull() ?.let(block) - -public inline fun BusinessConnection.enabledOrNull(): BusinessConnection.Enabled? = this as? dev.inmo.tgbotapi.types.business_connection.BusinessConnection.Enabled - -public inline fun BusinessConnection.enabledOrThrow(): BusinessConnection.Enabled = this as dev.inmo.tgbotapi.types.business_connection.BusinessConnection.Enabled - -public inline fun BusinessConnection.ifEnabled(block: (BusinessConnection.Enabled) -> T): T? = enabledOrNull() ?.let(block) - -public inline fun BusinessConnection.disabledOrNull(): BusinessConnection.Disabled? = this as? dev.inmo.tgbotapi.types.business_connection.BusinessConnection.Disabled - -public inline fun BusinessConnection.disabledOrThrow(): BusinessConnection.Disabled = this as dev.inmo.tgbotapi.types.business_connection.BusinessConnection.Disabled - -public inline fun BusinessConnection.ifDisabled(block: (BusinessConnection.Disabled) -> T): T? = disabledOrNull() ?.let(block) - -public inline fun BotAction.typingActionOrNull(): TypingAction? = this as? dev.inmo.tgbotapi.types.actions.TypingAction - -public inline fun BotAction.typingActionOrThrow(): TypingAction = this as dev.inmo.tgbotapi.types.actions.TypingAction - -public inline fun BotAction.ifTypingAction(block: (TypingAction) -> T): T? = typingActionOrNull() ?.let(block) - -public inline fun BotAction.uploadPhotoActionOrNull(): UploadPhotoAction? = this as? dev.inmo.tgbotapi.types.actions.UploadPhotoAction - -public inline fun BotAction.uploadPhotoActionOrThrow(): UploadPhotoAction = this as dev.inmo.tgbotapi.types.actions.UploadPhotoAction - -public inline fun BotAction.ifUploadPhotoAction(block: (UploadPhotoAction) -> T): T? = uploadPhotoActionOrNull() ?.let(block) - -public inline fun BotAction.recordVideoActionOrNull(): RecordVideoAction? = this as? dev.inmo.tgbotapi.types.actions.RecordVideoAction - -public inline fun BotAction.recordVideoActionOrThrow(): RecordVideoAction = this as dev.inmo.tgbotapi.types.actions.RecordVideoAction - -public inline fun BotAction.ifRecordVideoAction(block: (RecordVideoAction) -> T): T? = recordVideoActionOrNull() ?.let(block) - -public inline fun BotAction.uploadVideoActionOrNull(): UploadVideoAction? = this as? dev.inmo.tgbotapi.types.actions.UploadVideoAction - -public inline fun BotAction.uploadVideoActionOrThrow(): UploadVideoAction = this as dev.inmo.tgbotapi.types.actions.UploadVideoAction - -public inline fun BotAction.ifUploadVideoAction(block: (UploadVideoAction) -> T): T? = uploadVideoActionOrNull() ?.let(block) - -public inline fun BotAction.recordVoiceActionOrNull(): RecordVoiceAction? = this as? dev.inmo.tgbotapi.types.actions.RecordVoiceAction - -public inline fun BotAction.recordVoiceActionOrThrow(): RecordVoiceAction = this as dev.inmo.tgbotapi.types.actions.RecordVoiceAction - -public inline fun BotAction.ifRecordVoiceAction(block: (RecordVoiceAction) -> T): T? = recordVoiceActionOrNull() ?.let(block) - -public inline fun BotAction.uploadVoiceActionOrNull(): UploadVoiceAction? = this as? dev.inmo.tgbotapi.types.actions.UploadVoiceAction - -public inline fun BotAction.uploadVoiceActionOrThrow(): UploadVoiceAction = this as dev.inmo.tgbotapi.types.actions.UploadVoiceAction - -public inline fun BotAction.ifUploadVoiceAction(block: (UploadVoiceAction) -> T): T? = uploadVoiceActionOrNull() ?.let(block) - -public inline fun BotAction.uploadDocumentActionOrNull(): UploadDocumentAction? = this as? dev.inmo.tgbotapi.types.actions.UploadDocumentAction - -public inline fun BotAction.uploadDocumentActionOrThrow(): UploadDocumentAction = this as dev.inmo.tgbotapi.types.actions.UploadDocumentAction - -public inline fun BotAction.ifUploadDocumentAction(block: (UploadDocumentAction) -> T): T? = uploadDocumentActionOrNull() ?.let(block) - -public inline fun BotAction.findLocationActionOrNull(): FindLocationAction? = this as? dev.inmo.tgbotapi.types.actions.FindLocationAction - -public inline fun BotAction.findLocationActionOrThrow(): FindLocationAction = this as dev.inmo.tgbotapi.types.actions.FindLocationAction - -public inline fun BotAction.ifFindLocationAction(block: (FindLocationAction) -> T): T? = findLocationActionOrNull() ?.let(block) - -public inline fun BotAction.recordVideoNoteActionOrNull(): RecordVideoNoteAction? = this as? dev.inmo.tgbotapi.types.actions.RecordVideoNoteAction - -public inline fun BotAction.recordVideoNoteActionOrThrow(): RecordVideoNoteAction = this as dev.inmo.tgbotapi.types.actions.RecordVideoNoteAction - -public inline fun BotAction.ifRecordVideoNoteAction(block: (RecordVideoNoteAction) -> T): T? = recordVideoNoteActionOrNull() ?.let(block) - -public inline fun BotAction.uploadVideoNoteActionOrNull(): UploadVideoNoteAction? = this as? dev.inmo.tgbotapi.types.actions.UploadVideoNoteAction - -public inline fun BotAction.uploadVideoNoteActionOrThrow(): UploadVideoNoteAction = this as dev.inmo.tgbotapi.types.actions.UploadVideoNoteAction - -public inline fun BotAction.ifUploadVideoNoteAction(block: (UploadVideoNoteAction) -> T): T? = uploadVideoNoteActionOrNull() ?.let(block) - -public inline fun BotAction.chooseStickerActionOrNull(): ChooseStickerAction? = this as? dev.inmo.tgbotapi.types.actions.ChooseStickerAction - -public inline fun BotAction.chooseStickerActionOrThrow(): ChooseStickerAction = this as dev.inmo.tgbotapi.types.actions.ChooseStickerAction - -public inline fun BotAction.ifChooseStickerAction(block: (ChooseStickerAction) -> T): T? = chooseStickerActionOrNull() ?.let(block) - -public inline fun BotAction.customBotActionOrNull(): CustomBotAction? = this as? dev.inmo.tgbotapi.types.actions.CustomBotAction - -public inline fun BotAction.customBotActionOrThrow(): CustomBotAction = this as dev.inmo.tgbotapi.types.actions.CustomBotAction - -public inline fun BotAction.ifCustomBotAction(block: (CustomBotAction) -> T): T? = customBotActionOrNull() ?.let(block) - -public inline fun Update.guestMessageUpdateOrNull(): GuestMessageUpdate? = this as? dev.inmo.tgbotapi.types.update.GuestMessageUpdate - -public inline fun Update.guestMessageUpdateOrThrow(): GuestMessageUpdate = this as dev.inmo.tgbotapi.types.update.GuestMessageUpdate - -public inline fun Update.ifGuestMessageUpdate(block: (GuestMessageUpdate) -> T): T? = guestMessageUpdateOrNull() ?.let(block) - -public inline fun Update.chatJoinRequestUpdateOrNull(): ChatJoinRequestUpdate? = this as? dev.inmo.tgbotapi.types.update.ChatJoinRequestUpdate - -public inline fun Update.chatJoinRequestUpdateOrThrow(): ChatJoinRequestUpdate = this as dev.inmo.tgbotapi.types.update.ChatJoinRequestUpdate - -public inline fun Update.ifChatJoinRequestUpdate(block: (ChatJoinRequestUpdate) -> T): T? = chatJoinRequestUpdateOrNull() ?.let(block) - -public inline fun Update.editChannelPostUpdateOrNull(): EditChannelPostUpdate? = this as? dev.inmo.tgbotapi.types.update.EditChannelPostUpdate - -public inline fun Update.editChannelPostUpdateOrThrow(): EditChannelPostUpdate = this as dev.inmo.tgbotapi.types.update.EditChannelPostUpdate - -public inline fun Update.ifEditChannelPostUpdate(block: (EditChannelPostUpdate) -> T): T? = editChannelPostUpdateOrNull() ?.let(block) - -public inline fun Update.chosenInlineResultUpdateOrNull(): ChosenInlineResultUpdate? = this as? dev.inmo.tgbotapi.types.update.ChosenInlineResultUpdate - -public inline fun Update.chosenInlineResultUpdateOrThrow(): ChosenInlineResultUpdate = this as dev.inmo.tgbotapi.types.update.ChosenInlineResultUpdate - -public inline fun Update.ifChosenInlineResultUpdate(block: (ChosenInlineResultUpdate) -> T): T? = chosenInlineResultUpdateOrNull() ?.let(block) - -public inline fun Update.chatMessageReactionsCountUpdatedUpdateOrNull(): ChatMessageReactionsCountUpdatedUpdate? = this as? dev.inmo.tgbotapi.types.update.ChatMessageReactionsCountUpdatedUpdate - -public inline fun Update.chatMessageReactionsCountUpdatedUpdateOrThrow(): ChatMessageReactionsCountUpdatedUpdate = this as dev.inmo.tgbotapi.types.update.ChatMessageReactionsCountUpdatedUpdate - -public inline fun Update.ifChatMessageReactionsCountUpdatedUpdate(block: (ChatMessageReactionsCountUpdatedUpdate) -> T): T? = chatMessageReactionsCountUpdatedUpdateOrNull() ?.let(block) - -public inline fun Update.messageUpdateOrNull(): MessageUpdate? = this as? dev.inmo.tgbotapi.types.update.MessageUpdate - -public inline fun Update.messageUpdateOrThrow(): MessageUpdate = this as dev.inmo.tgbotapi.types.update.MessageUpdate - -public inline fun Update.ifMessageUpdate(block: (MessageUpdate) -> T): T? = messageUpdateOrNull() ?.let(block) - -public inline fun Update.preCheckoutQueryUpdateOrNull(): PreCheckoutQueryUpdate? = this as? dev.inmo.tgbotapi.types.update.PreCheckoutQueryUpdate - -public inline fun Update.preCheckoutQueryUpdateOrThrow(): PreCheckoutQueryUpdate = this as dev.inmo.tgbotapi.types.update.PreCheckoutQueryUpdate - -public inline fun Update.ifPreCheckoutQueryUpdate(block: (PreCheckoutQueryUpdate) -> T): T? = preCheckoutQueryUpdateOrNull() ?.let(block) - -public inline fun Update.deletedBusinessMessageUpdateOrNull(): DeletedBusinessMessageUpdate? = this as? dev.inmo.tgbotapi.types.update.DeletedBusinessMessageUpdate - -public inline fun Update.deletedBusinessMessageUpdateOrThrow(): DeletedBusinessMessageUpdate = this as dev.inmo.tgbotapi.types.update.DeletedBusinessMessageUpdate - -public inline fun Update.ifDeletedBusinessMessageUpdate(block: (DeletedBusinessMessageUpdate) -> T): T? = deletedBusinessMessageUpdateOrNull() ?.let(block) - -public inline fun Update.businessMessageUpdateOrNull(): BusinessMessageUpdate? = this as? dev.inmo.tgbotapi.types.update.BusinessMessageUpdate - -public inline fun Update.businessMessageUpdateOrThrow(): BusinessMessageUpdate = this as dev.inmo.tgbotapi.types.update.BusinessMessageUpdate - -public inline fun Update.ifBusinessMessageUpdate(block: (BusinessMessageUpdate) -> T): T? = businessMessageUpdateOrNull() ?.let(block) - -public inline fun Update.managedBotUpdateOrNull(): ManagedBotUpdate? = this as? dev.inmo.tgbotapi.types.update.ManagedBotUpdate - -public inline fun Update.managedBotUpdateOrThrow(): ManagedBotUpdate = this as dev.inmo.tgbotapi.types.update.ManagedBotUpdate - -public inline fun Update.ifManagedBotUpdate(block: (ManagedBotUpdate) -> T): T? = managedBotUpdateOrNull() ?.let(block) - -public inline fun Update.chatMessageReactionUpdatedUpdateOrNull(): ChatMessageReactionUpdatedUpdate? = this as? dev.inmo.tgbotapi.types.update.ChatMessageReactionUpdatedUpdate - -public inline fun Update.chatMessageReactionUpdatedUpdateOrThrow(): ChatMessageReactionUpdatedUpdate = this as dev.inmo.tgbotapi.types.update.ChatMessageReactionUpdatedUpdate - -public inline fun Update.ifChatMessageReactionUpdatedUpdate(block: (ChatMessageReactionUpdatedUpdate) -> T): T? = chatMessageReactionUpdatedUpdateOrNull() ?.let(block) - -public inline fun Update.myChatMemberUpdatedUpdateOrNull(): MyChatMemberUpdatedUpdate? = this as? dev.inmo.tgbotapi.types.update.MyChatMemberUpdatedUpdate - -public inline fun Update.myChatMemberUpdatedUpdateOrThrow(): MyChatMemberUpdatedUpdate = this as dev.inmo.tgbotapi.types.update.MyChatMemberUpdatedUpdate - -public inline fun Update.ifMyChatMemberUpdatedUpdate(block: (MyChatMemberUpdatedUpdate) -> T): T? = myChatMemberUpdatedUpdateOrNull() ?.let(block) - -public inline fun Update.commonChatMemberUpdatedUpdateOrNull(): CommonChatMemberUpdatedUpdate? = this as? dev.inmo.tgbotapi.types.update.CommonChatMemberUpdatedUpdate - -public inline fun Update.commonChatMemberUpdatedUpdateOrThrow(): CommonChatMemberUpdatedUpdate = this as dev.inmo.tgbotapi.types.update.CommonChatMemberUpdatedUpdate - -public inline fun Update.ifCommonChatMemberUpdatedUpdate(block: (CommonChatMemberUpdatedUpdate) -> T): T? = commonChatMemberUpdatedUpdateOrNull() ?.let(block) - -public inline fun Update.callbackQueryUpdateOrNull(): CallbackQueryUpdate? = this as? dev.inmo.tgbotapi.types.update.CallbackQueryUpdate - -public inline fun Update.callbackQueryUpdateOrThrow(): CallbackQueryUpdate = this as dev.inmo.tgbotapi.types.update.CallbackQueryUpdate - -public inline fun Update.ifCallbackQueryUpdate(block: (CallbackQueryUpdate) -> T): T? = callbackQueryUpdateOrNull() ?.let(block) - -public inline fun Update.editMessageUpdateOrNull(): EditMessageUpdate? = this as? dev.inmo.tgbotapi.types.update.EditMessageUpdate - -public inline fun Update.editMessageUpdateOrThrow(): EditMessageUpdate = this as dev.inmo.tgbotapi.types.update.EditMessageUpdate - -public inline fun Update.ifEditMessageUpdate(block: (EditMessageUpdate) -> T): T? = editMessageUpdateOrNull() ?.let(block) - -public inline fun Update.baseMessageUpdateOrNull(): BaseMessageUpdate? = this as? dev.inmo.tgbotapi.types.update.abstracts.BaseMessageUpdate - -public inline fun Update.baseMessageUpdateOrThrow(): BaseMessageUpdate = this as dev.inmo.tgbotapi.types.update.abstracts.BaseMessageUpdate - -public inline fun Update.ifBaseMessageUpdate(block: (BaseMessageUpdate) -> T): T? = baseMessageUpdateOrNull() ?.let(block) - -public inline fun Update.unknownUpdateOrNull(): UnknownUpdate? = this as? dev.inmo.tgbotapi.types.update.abstracts.UnknownUpdate - -public inline fun Update.unknownUpdateOrThrow(): UnknownUpdate = this as dev.inmo.tgbotapi.types.update.abstracts.UnknownUpdate - -public inline fun Update.ifUnknownUpdate(block: (UnknownUpdate) -> T): T? = unknownUpdateOrNull() ?.let(block) - -public inline fun Update.chatMemberUpdatedUpdateOrNull(): ChatMemberUpdatedUpdate? = this as? dev.inmo.tgbotapi.types.update.abstracts.ChatMemberUpdatedUpdate - -public inline fun Update.chatMemberUpdatedUpdateOrThrow(): ChatMemberUpdatedUpdate = this as dev.inmo.tgbotapi.types.update.abstracts.ChatMemberUpdatedUpdate - -public inline fun Update.ifChatMemberUpdatedUpdate(block: (ChatMemberUpdatedUpdate) -> T): T? = chatMemberUpdatedUpdateOrNull() ?.let(block) - -public inline fun Update.baseEditMessageUpdateOrNull(): BaseEditMessageUpdate? = this as? dev.inmo.tgbotapi.types.update.abstracts.BaseEditMessageUpdate - -public inline fun Update.baseEditMessageUpdateOrThrow(): BaseEditMessageUpdate = this as dev.inmo.tgbotapi.types.update.abstracts.BaseEditMessageUpdate - -public inline fun Update.ifBaseEditMessageUpdate(block: (BaseEditMessageUpdate) -> T): T? = baseEditMessageUpdateOrNull() ?.let(block) - -public inline fun Update.baseSentMessageUpdateOrNull(): BaseSentMessageUpdate? = this as? dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate - -public inline fun Update.baseSentMessageUpdateOrThrow(): BaseSentMessageUpdate = this as dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate - -public inline fun Update.ifBaseSentMessageUpdate(block: (BaseSentMessageUpdate) -> T): T? = baseSentMessageUpdateOrNull() ?.let(block) - -public inline fun Update.shippingQueryUpdateOrNull(): ShippingQueryUpdate? = this as? dev.inmo.tgbotapi.types.update.ShippingQueryUpdate - -public inline fun Update.shippingQueryUpdateOrThrow(): ShippingQueryUpdate = this as dev.inmo.tgbotapi.types.update.ShippingQueryUpdate - -public inline fun Update.ifShippingQueryUpdate(block: (ShippingQueryUpdate) -> T): T? = shippingQueryUpdateOrNull() ?.let(block) - -public inline fun Update.chatBoostUpdatedUpdateOrNull(): ChatBoostUpdatedUpdate? = this as? dev.inmo.tgbotapi.types.update.ChatBoostUpdatedUpdate - -public inline fun Update.chatBoostUpdatedUpdateOrThrow(): ChatBoostUpdatedUpdate = this as dev.inmo.tgbotapi.types.update.ChatBoostUpdatedUpdate - -public inline fun Update.ifChatBoostUpdatedUpdate(block: (ChatBoostUpdatedUpdate) -> T): T? = chatBoostUpdatedUpdateOrNull() ?.let(block) - -public inline fun Update.chatBoostRemovedUpdateOrNull(): ChatBoostRemovedUpdate? = this as? dev.inmo.tgbotapi.types.update.ChatBoostRemovedUpdate - -public inline fun Update.chatBoostRemovedUpdateOrThrow(): ChatBoostRemovedUpdate = this as dev.inmo.tgbotapi.types.update.ChatBoostRemovedUpdate - -public inline fun Update.ifChatBoostRemovedUpdate(block: (ChatBoostRemovedUpdate) -> T): T? = chatBoostRemovedUpdateOrNull() ?.let(block) - -public inline fun Update.editBusinessMessageUpdateOrNull(): EditBusinessMessageUpdate? = this as? dev.inmo.tgbotapi.types.update.EditBusinessMessageUpdate - -public inline fun Update.editBusinessMessageUpdateOrThrow(): EditBusinessMessageUpdate = this as dev.inmo.tgbotapi.types.update.EditBusinessMessageUpdate - -public inline fun Update.ifEditBusinessMessageUpdate(block: (EditBusinessMessageUpdate) -> T): T? = editBusinessMessageUpdateOrNull() ?.let(block) - -public inline fun Update.businessConnectionUpdateOrNull(): BusinessConnectionUpdate? = this as? dev.inmo.tgbotapi.types.update.BusinessConnectionUpdate - -public inline fun Update.businessConnectionUpdateOrThrow(): BusinessConnectionUpdate = this as dev.inmo.tgbotapi.types.update.BusinessConnectionUpdate - -public inline fun Update.ifBusinessConnectionUpdate(block: (BusinessConnectionUpdate) -> T): T? = businessConnectionUpdateOrNull() ?.let(block) - -public inline fun Update.pollUpdateOrNull(): PollUpdate? = this as? dev.inmo.tgbotapi.types.update.PollUpdate - -public inline fun Update.pollUpdateOrThrow(): PollUpdate = this as dev.inmo.tgbotapi.types.update.PollUpdate - -public inline fun Update.ifPollUpdate(block: (PollUpdate) -> T): T? = pollUpdateOrNull() ?.let(block) - -public inline fun Update.inlineQueryUpdateOrNull(): InlineQueryUpdate? = this as? dev.inmo.tgbotapi.types.update.InlineQueryUpdate - -public inline fun Update.inlineQueryUpdateOrThrow(): InlineQueryUpdate = this as dev.inmo.tgbotapi.types.update.InlineQueryUpdate - -public inline fun Update.ifInlineQueryUpdate(block: (InlineQueryUpdate) -> T): T? = inlineQueryUpdateOrNull() ?.let(block) - -public inline fun Update.paidMediaPurchasedUpdateOrNull(): PaidMediaPurchasedUpdate? = this as? dev.inmo.tgbotapi.types.update.PaidMediaPurchasedUpdate - -public inline fun Update.paidMediaPurchasedUpdateOrThrow(): PaidMediaPurchasedUpdate = this as dev.inmo.tgbotapi.types.update.PaidMediaPurchasedUpdate - -public inline fun Update.ifPaidMediaPurchasedUpdate(block: (PaidMediaPurchasedUpdate) -> T): T? = paidMediaPurchasedUpdateOrNull() ?.let(block) - -public inline fun Update.channelPostUpdateOrNull(): ChannelPostUpdate? = this as? dev.inmo.tgbotapi.types.update.ChannelPostUpdate - -public inline fun Update.channelPostUpdateOrThrow(): ChannelPostUpdate = this as dev.inmo.tgbotapi.types.update.ChannelPostUpdate - -public inline fun Update.ifChannelPostUpdate(block: (ChannelPostUpdate) -> T): T? = channelPostUpdateOrNull() ?.let(block) - -public inline fun Update.pollAnswerUpdateOrNull(): PollAnswerUpdate? = this as? dev.inmo.tgbotapi.types.update.PollAnswerUpdate - -public inline fun Update.pollAnswerUpdateOrThrow(): PollAnswerUpdate = this as dev.inmo.tgbotapi.types.update.PollAnswerUpdate - -public inline fun Update.ifPollAnswerUpdate(block: (PollAnswerUpdate) -> T): T? = pollAnswerUpdateOrNull() ?.let(block) - -public inline fun ReplyInfo.internalOrNull(): ReplyInfo.Internal? = this as? dev.inmo.tgbotapi.types.ReplyInfo.Internal - -public inline fun ReplyInfo.internalOrThrow(): ReplyInfo.Internal = this as dev.inmo.tgbotapi.types.ReplyInfo.Internal - -public inline fun ReplyInfo.ifInternal(block: (ReplyInfo.Internal) -> T): T? = internalOrNull() ?.let(block) - -public inline fun ReplyInfo.toStoryOrNull(): ReplyInfo.ToStory? = this as? dev.inmo.tgbotapi.types.ReplyInfo.ToStory - -public inline fun ReplyInfo.toStoryOrThrow(): ReplyInfo.ToStory = this as dev.inmo.tgbotapi.types.ReplyInfo.ToStory - -public inline fun ReplyInfo.ifToStory(block: (ReplyInfo.ToStory) -> T): T? = toStoryOrNull() ?.let(block) - -public inline fun ReplyInfo.externalOrNull(): ReplyInfo.External? = this as? dev.inmo.tgbotapi.types.ReplyInfo.External - -public inline fun ReplyInfo.externalOrThrow(): ReplyInfo.External = this as dev.inmo.tgbotapi.types.ReplyInfo.External - -public inline fun ReplyInfo.ifExternal(block: (ReplyInfo.External) -> T): T? = externalOrNull() ?.let(block) - -public inline fun ReplyInfo.externalTextOrNull(): ReplyInfo.External.Text? = this as? dev.inmo.tgbotapi.types.ReplyInfo.External.Text - -public inline fun ReplyInfo.externalTextOrThrow(): ReplyInfo.External.Text = this as dev.inmo.tgbotapi.types.ReplyInfo.External.Text - -public inline fun ReplyInfo.ifExternalText(block: (ReplyInfo.External.Text) -> T): T? = externalTextOrNull() ?.let(block) - -public inline fun ReplyInfo.externalContentOrNull(): ReplyInfo.External.Content? = this as? dev.inmo.tgbotapi.types.ReplyInfo.External.Content - -public inline fun ReplyInfo.externalContentOrThrow(): ReplyInfo.External.Content = this as dev.inmo.tgbotapi.types.ReplyInfo.External.Content - -public inline fun ReplyInfo.ifExternalContent(block: (ReplyInfo.External.Content) -> T): T? = externalContentOrNull() ?.let(block) - -public inline fun ReplyInfo.externalContentSimpleOrNull(): ReplyInfo.External.Content.Simple? = this as? dev.inmo.tgbotapi.types.ReplyInfo.External.Content.Simple - -public inline fun ReplyInfo.externalContentSimpleOrThrow(): ReplyInfo.External.Content.Simple = this as dev.inmo.tgbotapi.types.ReplyInfo.External.Content.Simple - -public inline fun ReplyInfo.ifExternalContentSimple(block: (ReplyInfo.External.Content.Simple) -> T): T? = externalContentSimpleOrNull() ?.let(block) - -public inline fun ReplyInfo.externalContentMediaOrNull(): ReplyInfo.External.Content.Media? = this as? dev.inmo.tgbotapi.types.ReplyInfo.External.Content.Media - -public inline fun ReplyInfo.externalContentMediaOrThrow(): ReplyInfo.External.Content.Media = this as dev.inmo.tgbotapi.types.ReplyInfo.External.Content.Media - -public inline fun ReplyInfo.ifExternalContentMedia(block: (ReplyInfo.External.Content.Media) -> T): T? = externalContentMediaOrNull() ?.let(block) - -public inline fun OptionallyWithUser.locationChosenInlineResultOrNull(): LocationChosenInlineResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.LocationChosenInlineResult - -public inline fun OptionallyWithUser.locationChosenInlineResultOrThrow(): LocationChosenInlineResult = this as dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.LocationChosenInlineResult - -public inline fun OptionallyWithUser.ifLocationChosenInlineResult(block: (LocationChosenInlineResult) -> T): T? = locationChosenInlineResultOrNull() ?.let(block) - -public inline fun OptionallyWithUser.baseChosenInlineResultOrNull(): BaseChosenInlineResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.BaseChosenInlineResult - -public inline fun OptionallyWithUser.baseChosenInlineResultOrThrow(): BaseChosenInlineResult = this as dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.BaseChosenInlineResult - -public inline fun OptionallyWithUser.ifBaseChosenInlineResult(block: (BaseChosenInlineResult) -> T): T? = baseChosenInlineResultOrNull() ?.let(block) - -public inline fun OptionallyWithUser.chosenInlineResultOrNull(): ChosenInlineResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.ChosenInlineResult - -public inline fun OptionallyWithUser.chosenInlineResultOrThrow(): ChosenInlineResult = this as dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.ChosenInlineResult - -public inline fun OptionallyWithUser.ifChosenInlineResult(block: (ChosenInlineResult) -> T): T? = chosenInlineResultOrNull() ?.let(block) - -public inline fun OptionallyWithUser.baseInlineQueryOrNull(): BaseInlineQuery? = this as? dev.inmo.tgbotapi.types.InlineQueries.query.BaseInlineQuery - -public inline fun OptionallyWithUser.baseInlineQueryOrThrow(): BaseInlineQuery = this as dev.inmo.tgbotapi.types.InlineQueries.query.BaseInlineQuery - -public inline fun OptionallyWithUser.ifBaseInlineQuery(block: (BaseInlineQuery) -> T): T? = baseInlineQueryOrNull() ?.let(block) - -public inline fun OptionallyWithUser.inlineQueryOrNull(): InlineQuery? = this as? dev.inmo.tgbotapi.types.InlineQueries.query.InlineQuery - -public inline fun OptionallyWithUser.inlineQueryOrThrow(): InlineQuery = this as dev.inmo.tgbotapi.types.InlineQueries.query.InlineQuery - -public inline fun OptionallyWithUser.ifInlineQuery(block: (InlineQuery) -> T): T? = inlineQueryOrNull() ?.let(block) - -public inline fun OptionallyWithUser.locationInlineQueryOrNull(): LocationInlineQuery? = this as? dev.inmo.tgbotapi.types.InlineQueries.query.LocationInlineQuery - -public inline fun OptionallyWithUser.locationInlineQueryOrThrow(): LocationInlineQuery = this as dev.inmo.tgbotapi.types.InlineQueries.query.LocationInlineQuery - -public inline fun OptionallyWithUser.ifLocationInlineQuery(block: (LocationInlineQuery) -> T): T? = locationInlineQueryOrNull() ?.let(block) - -public inline fun OptionallyWithUser.paidMediaPurchasedOrNull(): PaidMediaPurchased? = this as? dev.inmo.tgbotapi.types.message.payments.PaidMediaPurchased - -public inline fun OptionallyWithUser.paidMediaPurchasedOrThrow(): PaidMediaPurchased = this as dev.inmo.tgbotapi.types.message.payments.PaidMediaPurchased - -public inline fun OptionallyWithUser.ifPaidMediaPurchased(block: (PaidMediaPurchased) -> T): T? = paidMediaPurchasedOrNull() ?.let(block) - -public inline fun OptionallyWithUser.commonSupergroupEventMessageOrNull(): CommonSupergroupEventMessage? = this as? dev.inmo.tgbotapi.types.message.CommonSupergroupEventMessage - -public inline fun OptionallyWithUser.commonSupergroupEventMessageOrThrow(): CommonSupergroupEventMessage = this as dev.inmo.tgbotapi.types.message.CommonSupergroupEventMessage - -public inline fun OptionallyWithUser.ifCommonSupergroupEventMessage(block: (CommonSupergroupEventMessage) -> T): T? = commonSupergroupEventMessageOrNull() ?.let(block) +public inline fun OptionallyWithUser.ifPollAnswerAnonymous(block: (PollAnswer.Anonymous) -> T): T? = pollAnswerAnonymousOrNull() ?.let(block) public inline fun OptionallyWithUser.forwardInfoByUserOrNull(): ForwardInfo.ByUser? = this as? dev.inmo.tgbotapi.types.message.ForwardInfo.ByUser @@ -4066,17 +4146,59 @@ public inline fun OptionallyWithUser.forwardInfoByUserOrThrow(): ForwardInfo.ByU public inline fun OptionallyWithUser.ifForwardInfoByUser(block: (ForwardInfo.ByUser) -> T): T? = forwardInfoByUserOrNull() ?.let(block) +public inline fun OptionallyWithUser.paidMediaPurchasedOrNull(): PaidMediaPurchased? = this as? dev.inmo.tgbotapi.types.message.payments.PaidMediaPurchased + +public inline fun OptionallyWithUser.paidMediaPurchasedOrThrow(): PaidMediaPurchased = this as dev.inmo.tgbotapi.types.message.payments.PaidMediaPurchased + +public inline fun OptionallyWithUser.ifPaidMediaPurchased(block: (PaidMediaPurchased) -> T): T? = paidMediaPurchasedOrNull() ?.let(block) + public inline fun OptionallyWithUser.leftChatMemberEventOrNull(): LeftChatMemberEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.LeftChatMemberEvent public inline fun OptionallyWithUser.leftChatMemberEventOrThrow(): LeftChatMemberEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.LeftChatMemberEvent public inline fun OptionallyWithUser.ifLeftChatMemberEvent(block: (LeftChatMemberEvent) -> T): T? = leftChatMemberEventOrNull() ?.let(block) -public inline fun OptionallyWithUser.businessContentMessageOrNull(): BusinessContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.BusinessContentMessage +public inline fun OptionallyWithUser.commonChannelDirectMessagesEventMessageOrNull(): CommonChannelDirectMessagesEventMessage? = this as? dev.inmo.tgbotapi.types.message.CommonChannelDirectMessagesEventMessage -public inline fun OptionallyWithUser.businessContentMessageOrThrow(): BusinessContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.BusinessContentMessage +public inline fun OptionallyWithUser.commonChannelDirectMessagesEventMessageOrThrow(): CommonChannelDirectMessagesEventMessage = this as dev.inmo.tgbotapi.types.message.CommonChannelDirectMessagesEventMessage -public inline fun OptionallyWithUser.ifBusinessContentMessage(block: (BusinessContentMessage) -> T): T? = businessContentMessageOrNull() ?.let(block) +public inline fun OptionallyWithUser.ifCommonChannelDirectMessagesEventMessage(block: (CommonChannelDirectMessagesEventMessage) -> T): T? = commonChannelDirectMessagesEventMessageOrNull() ?.let(block) + +public inline fun OptionallyWithUser.passportMessageOrNull(): PassportMessage? = this as? dev.inmo.tgbotapi.types.message.PassportMessage + +public inline fun OptionallyWithUser.passportMessageOrThrow(): PassportMessage = this as dev.inmo.tgbotapi.types.message.PassportMessage + +public inline fun OptionallyWithUser.ifPassportMessage(block: (PassportMessage) -> T): T? = passportMessageOrNull() ?.let(block) + +public inline fun OptionallyWithUser.channelContentMessageOrNull(): ChannelContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.ChannelContentMessage + +public inline fun OptionallyWithUser.channelContentMessageOrThrow(): ChannelContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.ChannelContentMessage + +public inline fun OptionallyWithUser.ifChannelContentMessage(block: (ChannelContentMessage) -> T): T? = channelContentMessageOrNull() ?.let(block) + +public inline fun OptionallyWithUser.channelDirectMessagesEventMessageOrNull(): ChannelDirectMessagesEventMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.ChannelDirectMessagesEventMessage + +public inline fun OptionallyWithUser.channelDirectMessagesEventMessageOrThrow(): ChannelDirectMessagesEventMessage = this as dev.inmo.tgbotapi.types.message.abstracts.ChannelDirectMessagesEventMessage + +public inline fun OptionallyWithUser.ifChannelDirectMessagesEventMessage(block: (ChannelDirectMessagesEventMessage) -> T): T? = channelDirectMessagesEventMessageOrNull() ?.let(block) + +public inline fun OptionallyWithUser.privateContentMessageOrNull(): PrivateContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PrivateContentMessage + +public inline fun OptionallyWithUser.privateContentMessageOrThrow(): PrivateContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PrivateContentMessage + +public inline fun OptionallyWithUser.ifPrivateContentMessage(block: (PrivateContentMessage) -> T): T? = privateContentMessageOrNull() ?.let(block) + +public inline fun OptionallyWithUser.privateForumContentMessageOrNull(): PrivateForumContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PrivateForumContentMessage + +public inline fun OptionallyWithUser.privateForumContentMessageOrThrow(): PrivateForumContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PrivateForumContentMessage + +public inline fun OptionallyWithUser.ifPrivateForumContentMessage(block: (PrivateForumContentMessage) -> T): T? = privateForumContentMessageOrNull() ?.let(block) + +public inline fun OptionallyWithUser.channelPaidPostOrNull(): ChannelPaidPost? = this as? dev.inmo.tgbotapi.types.message.abstracts.ChannelPaidPost + +public inline fun OptionallyWithUser.channelPaidPostOrThrow(): ChannelPaidPost = this as dev.inmo.tgbotapi.types.message.abstracts.ChannelPaidPost + +public inline fun OptionallyWithUser.ifChannelPaidPost(block: (ChannelPaidPost) -> T): T? = channelPaidPostOrNull() ?.let(block) public inline fun OptionallyWithUser.optionallyFromUserMessageOrNull(): OptionallyFromUserMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.OptionallyFromUserMessage @@ -4096,42 +4218,6 @@ public inline fun OptionallyWithUser.fromUserChatMessageOrThrow(): FromUserChatM public inline fun OptionallyWithUser.ifFromUserChatMessage(block: (FromUserChatMessage) -> T): T? = fromUserChatMessageOrNull() ?.let(block) -public inline fun OptionallyWithUser.requestGuestContentMessageOrNull(): RequestGuestContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.RequestGuestContentMessage - -public inline fun OptionallyWithUser.requestGuestContentMessageOrThrow(): RequestGuestContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.RequestGuestContentMessage - -public inline fun OptionallyWithUser.ifRequestGuestContentMessage(block: (RequestGuestContentMessage) -> T): T? = requestGuestContentMessageOrNull() ?.let(block) - -public inline fun OptionallyWithUser.supergroupEventMessageOrNull(): SupergroupEventMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.SupergroupEventMessage - -public inline fun OptionallyWithUser.supergroupEventMessageOrThrow(): SupergroupEventMessage = this as dev.inmo.tgbotapi.types.message.abstracts.SupergroupEventMessage - -public inline fun OptionallyWithUser.ifSupergroupEventMessage(block: (SupergroupEventMessage) -> T): T? = supergroupEventMessageOrNull() ?.let(block) - -public inline fun OptionallyWithUser.channelPaidPostOrNull(): ChannelPaidPost? = this as? dev.inmo.tgbotapi.types.message.abstracts.ChannelPaidPost - -public inline fun OptionallyWithUser.channelPaidPostOrThrow(): ChannelPaidPost = this as dev.inmo.tgbotapi.types.message.abstracts.ChannelPaidPost - -public inline fun OptionallyWithUser.ifChannelPaidPost(block: (ChannelPaidPost) -> T): T? = channelPaidPostOrNull() ?.let(block) - -public inline fun OptionallyWithUser.channelDirectMessagesEventMessageOrNull(): ChannelDirectMessagesEventMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.ChannelDirectMessagesEventMessage - -public inline fun OptionallyWithUser.channelDirectMessagesEventMessageOrThrow(): ChannelDirectMessagesEventMessage = this as dev.inmo.tgbotapi.types.message.abstracts.ChannelDirectMessagesEventMessage - -public inline fun OptionallyWithUser.ifChannelDirectMessagesEventMessage(block: (ChannelDirectMessagesEventMessage) -> T): T? = channelDirectMessagesEventMessageOrNull() ?.let(block) - -public inline fun OptionallyWithUser.groupEventMessageOrNull(): GroupEventMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.GroupEventMessage - -public inline fun OptionallyWithUser.groupEventMessageOrThrow(): GroupEventMessage = this as dev.inmo.tgbotapi.types.message.abstracts.GroupEventMessage - -public inline fun OptionallyWithUser.ifGroupEventMessage(block: (GroupEventMessage) -> T): T? = groupEventMessageOrNull() ?.let(block) - -public inline fun OptionallyWithUser.privateForumContentMessageOrNull(): PrivateForumContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PrivateForumContentMessage - -public inline fun OptionallyWithUser.privateForumContentMessageOrThrow(): PrivateForumContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PrivateForumContentMessage - -public inline fun OptionallyWithUser.ifPrivateForumContentMessage(block: (PrivateForumContentMessage) -> T): T? = privateForumContentMessageOrNull() ?.let(block) - public inline fun OptionallyWithUser.commonGroupContentMessageOrNull(): CommonGroupContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.CommonGroupContentMessage public inline fun OptionallyWithUser.commonGroupContentMessageOrThrow(): CommonGroupContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.CommonGroupContentMessage @@ -4156,29 +4242,29 @@ public inline fun OptionallyWithUser.commonSuggestedChannelDirectMessagesContent public inline fun OptionallyWithUser.ifCommonSuggestedChannelDirectMessagesContentMessage(block: (CommonSuggestedChannelDirectMessagesContentMessage) -> T): T? = commonSuggestedChannelDirectMessagesContentMessageOrNull() ?.let(block) -public inline fun OptionallyWithUser.channelContentMessageOrNull(): ChannelContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.ChannelContentMessage +public inline fun OptionallyWithUser.groupEventMessageOrNull(): GroupEventMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.GroupEventMessage -public inline fun OptionallyWithUser.channelContentMessageOrThrow(): ChannelContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.ChannelContentMessage +public inline fun OptionallyWithUser.groupEventMessageOrThrow(): GroupEventMessage = this as dev.inmo.tgbotapi.types.message.abstracts.GroupEventMessage -public inline fun OptionallyWithUser.ifChannelContentMessage(block: (ChannelContentMessage) -> T): T? = channelContentMessageOrNull() ?.let(block) +public inline fun OptionallyWithUser.ifGroupEventMessage(block: (GroupEventMessage) -> T): T? = groupEventMessageOrNull() ?.let(block) -public inline fun OptionallyWithUser.privateContentMessageOrNull(): PrivateContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PrivateContentMessage +public inline fun OptionallyWithUser.supergroupEventMessageOrNull(): SupergroupEventMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.SupergroupEventMessage -public inline fun OptionallyWithUser.privateContentMessageOrThrow(): PrivateContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.PrivateContentMessage +public inline fun OptionallyWithUser.supergroupEventMessageOrThrow(): SupergroupEventMessage = this as dev.inmo.tgbotapi.types.message.abstracts.SupergroupEventMessage -public inline fun OptionallyWithUser.ifPrivateContentMessage(block: (PrivateContentMessage) -> T): T? = privateContentMessageOrNull() ?.let(block) +public inline fun OptionallyWithUser.ifSupergroupEventMessage(block: (SupergroupEventMessage) -> T): T? = supergroupEventMessageOrNull() ?.let(block) -public inline fun OptionallyWithUser.passportMessageOrNull(): PassportMessage? = this as? dev.inmo.tgbotapi.types.message.PassportMessage +public inline fun OptionallyWithUser.businessContentMessageOrNull(): BusinessContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.BusinessContentMessage -public inline fun OptionallyWithUser.passportMessageOrThrow(): PassportMessage = this as dev.inmo.tgbotapi.types.message.PassportMessage +public inline fun OptionallyWithUser.businessContentMessageOrThrow(): BusinessContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.BusinessContentMessage -public inline fun OptionallyWithUser.ifPassportMessage(block: (PassportMessage) -> T): T? = passportMessageOrNull() ?.let(block) +public inline fun OptionallyWithUser.ifBusinessContentMessage(block: (BusinessContentMessage) -> T): T? = businessContentMessageOrNull() ?.let(block) -public inline fun OptionallyWithUser.commonChannelDirectMessagesEventMessageOrNull(): CommonChannelDirectMessagesEventMessage? = this as? dev.inmo.tgbotapi.types.message.CommonChannelDirectMessagesEventMessage +public inline fun OptionallyWithUser.requestGuestContentMessageOrNull(): RequestGuestContentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.RequestGuestContentMessage -public inline fun OptionallyWithUser.commonChannelDirectMessagesEventMessageOrThrow(): CommonChannelDirectMessagesEventMessage = this as dev.inmo.tgbotapi.types.message.CommonChannelDirectMessagesEventMessage +public inline fun OptionallyWithUser.requestGuestContentMessageOrThrow(): RequestGuestContentMessage = this as dev.inmo.tgbotapi.types.message.abstracts.RequestGuestContentMessage -public inline fun OptionallyWithUser.ifCommonChannelDirectMessagesEventMessage(block: (CommonChannelDirectMessagesEventMessage) -> T): T? = commonChannelDirectMessagesEventMessageOrNull() ?.let(block) +public inline fun OptionallyWithUser.ifRequestGuestContentMessage(block: (RequestGuestContentMessage) -> T): T? = requestGuestContentMessageOrNull() ?.let(block) public inline fun OptionallyWithUser.commonGroupEventMessageOrNull(): CommonGroupEventMessage? = this as? dev.inmo.tgbotapi.types.message.CommonGroupEventMessage @@ -4186,6 +4272,96 @@ public inline fun OptionallyWithUser.commonGroupEventMessageOrThrow(): CommonGro public inline fun OptionallyWithUser.ifCommonGroupEventMessage(block: (CommonGroupEventMessage) -> T): T? = commonGroupEventMessageOrNull() ?.let(block) +public inline fun OptionallyWithUser.commonSupergroupEventMessageOrNull(): CommonSupergroupEventMessage? = this as? dev.inmo.tgbotapi.types.message.CommonSupergroupEventMessage + +public inline fun OptionallyWithUser.commonSupergroupEventMessageOrThrow(): CommonSupergroupEventMessage = this as dev.inmo.tgbotapi.types.message.CommonSupergroupEventMessage + +public inline fun OptionallyWithUser.ifCommonSupergroupEventMessage(block: (CommonSupergroupEventMessage) -> T): T? = commonSupergroupEventMessageOrNull() ?.let(block) + +public inline fun OptionallyWithUser.inaccessibleMessageDataCallbackQueryOrNull(): InaccessibleMessageDataCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.InaccessibleMessageDataCallbackQuery + +public inline fun OptionallyWithUser.inaccessibleMessageDataCallbackQueryOrThrow(): InaccessibleMessageDataCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.InaccessibleMessageDataCallbackQuery + +public inline fun OptionallyWithUser.ifInaccessibleMessageDataCallbackQuery(block: (InaccessibleMessageDataCallbackQuery) -> T): T? = inaccessibleMessageDataCallbackQueryOrNull() ?.let(block) + +public inline fun OptionallyWithUser.messageCallbackQueryOrNull(): MessageCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.MessageCallbackQuery + +public inline fun OptionallyWithUser.messageCallbackQueryOrThrow(): MessageCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.MessageCallbackQuery + +public inline fun OptionallyWithUser.ifMessageCallbackQuery(block: (MessageCallbackQuery) -> T): T? = messageCallbackQueryOrNull() ?.let(block) + +public inline fun OptionallyWithUser.abstractMessageCallbackQueryOrNull(): AbstractMessageCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.AbstractMessageCallbackQuery + +public inline fun OptionallyWithUser.abstractMessageCallbackQueryOrThrow(): AbstractMessageCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.AbstractMessageCallbackQuery + +public inline fun OptionallyWithUser.ifAbstractMessageCallbackQuery(block: (AbstractMessageCallbackQuery) -> T): T? = abstractMessageCallbackQueryOrNull() ?.let(block) + +public inline fun OptionallyWithUser.gameShortNameCallbackQueryOrNull(): GameShortNameCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.GameShortNameCallbackQuery + +public inline fun OptionallyWithUser.gameShortNameCallbackQueryOrThrow(): GameShortNameCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.GameShortNameCallbackQuery + +public inline fun OptionallyWithUser.ifGameShortNameCallbackQuery(block: (GameShortNameCallbackQuery) -> T): T? = gameShortNameCallbackQueryOrNull() ?.let(block) + +public inline fun OptionallyWithUser.callbackQueryOrNull(): CallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.CallbackQuery + +public inline fun OptionallyWithUser.callbackQueryOrThrow(): CallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.CallbackQuery + +public inline fun OptionallyWithUser.ifCallbackQuery(block: (CallbackQuery) -> T): T? = callbackQueryOrNull() ?.let(block) + +public inline fun OptionallyWithUser.unknownCallbackQueryTypeOrNull(): UnknownCallbackQueryType? = this as? dev.inmo.tgbotapi.types.queries.callback.UnknownCallbackQueryType + +public inline fun OptionallyWithUser.unknownCallbackQueryTypeOrThrow(): UnknownCallbackQueryType = this as dev.inmo.tgbotapi.types.queries.callback.UnknownCallbackQueryType + +public inline fun OptionallyWithUser.ifUnknownCallbackQueryType(block: (UnknownCallbackQueryType) -> T): T? = unknownCallbackQueryTypeOrNull() ?.let(block) + +public inline fun OptionallyWithUser.inlineMessageIdGameShortNameCallbackQueryOrNull(): InlineMessageIdGameShortNameCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.InlineMessageIdGameShortNameCallbackQuery + +public inline fun OptionallyWithUser.inlineMessageIdGameShortNameCallbackQueryOrThrow(): InlineMessageIdGameShortNameCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.InlineMessageIdGameShortNameCallbackQuery + +public inline fun OptionallyWithUser.ifInlineMessageIdGameShortNameCallbackQuery(block: (InlineMessageIdGameShortNameCallbackQuery) -> T): T? = inlineMessageIdGameShortNameCallbackQueryOrNull() ?.let(block) + +public inline fun OptionallyWithUser.inaccessibleMessageGameShortNameCallbackQueryOrNull(): InaccessibleMessageGameShortNameCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.InaccessibleMessageGameShortNameCallbackQuery + +public inline fun OptionallyWithUser.inaccessibleMessageGameShortNameCallbackQueryOrThrow(): InaccessibleMessageGameShortNameCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.InaccessibleMessageGameShortNameCallbackQuery + +public inline fun OptionallyWithUser.ifInaccessibleMessageGameShortNameCallbackQuery(block: (InaccessibleMessageGameShortNameCallbackQuery) -> T): T? = inaccessibleMessageGameShortNameCallbackQueryOrNull() ?.let(block) + +public inline fun OptionallyWithUser.dataCallbackQueryOrNull(): DataCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.DataCallbackQuery + +public inline fun OptionallyWithUser.dataCallbackQueryOrThrow(): DataCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.DataCallbackQuery + +public inline fun OptionallyWithUser.ifDataCallbackQuery(block: (DataCallbackQuery) -> T): T? = dataCallbackQueryOrNull() ?.let(block) + +public inline fun OptionallyWithUser.inaccessibleMessageCallbackQueryOrNull(): InaccessibleMessageCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.InaccessibleMessageCallbackQuery + +public inline fun OptionallyWithUser.inaccessibleMessageCallbackQueryOrThrow(): InaccessibleMessageCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.InaccessibleMessageCallbackQuery + +public inline fun OptionallyWithUser.ifInaccessibleMessageCallbackQuery(block: (InaccessibleMessageCallbackQuery) -> T): T? = inaccessibleMessageCallbackQueryOrNull() ?.let(block) + +public inline fun OptionallyWithUser.inlineMessageIdDataCallbackQueryOrNull(): InlineMessageIdDataCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.InlineMessageIdDataCallbackQuery + +public inline fun OptionallyWithUser.inlineMessageIdDataCallbackQueryOrThrow(): InlineMessageIdDataCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.InlineMessageIdDataCallbackQuery + +public inline fun OptionallyWithUser.ifInlineMessageIdDataCallbackQuery(block: (InlineMessageIdDataCallbackQuery) -> T): T? = inlineMessageIdDataCallbackQueryOrNull() ?.let(block) + +public inline fun OptionallyWithUser.messageDataCallbackQueryOrNull(): MessageDataCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.MessageDataCallbackQuery + +public inline fun OptionallyWithUser.messageDataCallbackQueryOrThrow(): MessageDataCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.MessageDataCallbackQuery + +public inline fun OptionallyWithUser.ifMessageDataCallbackQuery(block: (MessageDataCallbackQuery) -> T): T? = messageDataCallbackQueryOrNull() ?.let(block) + +public inline fun OptionallyWithUser.messageGameShortNameCallbackQueryOrNull(): MessageGameShortNameCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.MessageGameShortNameCallbackQuery + +public inline fun OptionallyWithUser.messageGameShortNameCallbackQueryOrThrow(): MessageGameShortNameCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.MessageGameShortNameCallbackQuery + +public inline fun OptionallyWithUser.ifMessageGameShortNameCallbackQuery(block: (MessageGameShortNameCallbackQuery) -> T): T? = messageGameShortNameCallbackQueryOrNull() ?.let(block) + +public inline fun OptionallyWithUser.inlineMessageIdCallbackQueryOrNull(): InlineMessageIdCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.InlineMessageIdCallbackQuery + +public inline fun OptionallyWithUser.inlineMessageIdCallbackQueryOrThrow(): InlineMessageIdCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.InlineMessageIdCallbackQuery + +public inline fun OptionallyWithUser.ifInlineMessageIdCallbackQuery(block: (InlineMessageIdCallbackQuery) -> T): T? = inlineMessageIdCallbackQueryOrNull() ?.let(block) + public inline fun OptionallyWithUser.preCheckoutQueryOrNull(): PreCheckoutQuery? = this as? dev.inmo.tgbotapi.types.payments.PreCheckoutQuery public inline fun OptionallyWithUser.preCheckoutQueryOrThrow(): PreCheckoutQuery = this as dev.inmo.tgbotapi.types.payments.PreCheckoutQuery @@ -4198,24 +4374,6 @@ public inline fun OptionallyWithUser.shippingQueryOrThrow(): ShippingQuery = thi public inline fun OptionallyWithUser.ifShippingQuery(block: (ShippingQuery) -> T): T? = shippingQueryOrNull() ?.let(block) -public inline fun OptionallyWithUser.pollAnswerOrNull(): PollAnswer? = this as? dev.inmo.tgbotapi.types.polls.PollAnswer - -public inline fun OptionallyWithUser.pollAnswerOrThrow(): PollAnswer = this as dev.inmo.tgbotapi.types.polls.PollAnswer - -public inline fun OptionallyWithUser.ifPollAnswer(block: (PollAnswer) -> T): T? = pollAnswerOrNull() ?.let(block) - -public inline fun OptionallyWithUser.pollAnswerPublicOrNull(): PollAnswer.Public? = this as? dev.inmo.tgbotapi.types.polls.PollAnswer.Public - -public inline fun OptionallyWithUser.pollAnswerPublicOrThrow(): PollAnswer.Public = this as dev.inmo.tgbotapi.types.polls.PollAnswer.Public - -public inline fun OptionallyWithUser.ifPollAnswerPublic(block: (PollAnswer.Public) -> T): T? = pollAnswerPublicOrNull() ?.let(block) - -public inline fun OptionallyWithUser.pollAnswerAnonymousOrNull(): PollAnswer.Anonymous? = this as? dev.inmo.tgbotapi.types.polls.PollAnswer.Anonymous - -public inline fun OptionallyWithUser.pollAnswerAnonymousOrThrow(): PollAnswer.Anonymous = this as dev.inmo.tgbotapi.types.polls.PollAnswer.Anonymous - -public inline fun OptionallyWithUser.ifPollAnswerAnonymous(block: (PollAnswer.Anonymous) -> T): T? = pollAnswerAnonymousOrNull() ?.let(block) - public inline fun OptionallyWithUser.chatInviteLinkOrNull(): ChatInviteLink? = this as? dev.inmo.tgbotapi.types.ChatInviteLink public inline fun OptionallyWithUser.chatInviteLinkOrThrow(): ChatInviteLink = this as dev.inmo.tgbotapi.types.ChatInviteLink @@ -4252,17 +4410,53 @@ public inline fun OptionallyWithUser.chatInviteLinkUnlimitedOrThrow(): ChatInvit public inline fun OptionallyWithUser.ifChatInviteLinkUnlimited(block: (ChatInviteLinkUnlimited) -> T): T? = chatInviteLinkUnlimitedOrNull() ?.let(block) -public inline fun OptionallyWithUser.directMessagesTopicOrNull(): DirectMessagesTopic? = this as? dev.inmo.tgbotapi.types.chat.DirectMessagesTopic +public inline fun OptionallyWithUser.baseInlineQueryOrNull(): BaseInlineQuery? = this as? dev.inmo.tgbotapi.types.InlineQueries.query.BaseInlineQuery -public inline fun OptionallyWithUser.directMessagesTopicOrThrow(): DirectMessagesTopic = this as dev.inmo.tgbotapi.types.chat.DirectMessagesTopic +public inline fun OptionallyWithUser.baseInlineQueryOrThrow(): BaseInlineQuery = this as dev.inmo.tgbotapi.types.InlineQueries.query.BaseInlineQuery -public inline fun OptionallyWithUser.ifDirectMessagesTopic(block: (DirectMessagesTopic) -> T): T? = directMessagesTopicOrNull() ?.let(block) +public inline fun OptionallyWithUser.ifBaseInlineQuery(block: (BaseInlineQuery) -> T): T? = baseInlineQueryOrNull() ?.let(block) -public inline fun OptionallyWithUser.restrictedChatMemberOrNull(): RestrictedChatMember? = this as? dev.inmo.tgbotapi.types.chat.member.RestrictedChatMember +public inline fun OptionallyWithUser.locationInlineQueryOrNull(): LocationInlineQuery? = this as? dev.inmo.tgbotapi.types.InlineQueries.query.LocationInlineQuery -public inline fun OptionallyWithUser.restrictedChatMemberOrThrow(): RestrictedChatMember = this as dev.inmo.tgbotapi.types.chat.member.RestrictedChatMember +public inline fun OptionallyWithUser.locationInlineQueryOrThrow(): LocationInlineQuery = this as dev.inmo.tgbotapi.types.InlineQueries.query.LocationInlineQuery -public inline fun OptionallyWithUser.ifRestrictedChatMember(block: (RestrictedChatMember) -> T): T? = restrictedChatMemberOrNull() ?.let(block) +public inline fun OptionallyWithUser.ifLocationInlineQuery(block: (LocationInlineQuery) -> T): T? = locationInlineQueryOrNull() ?.let(block) + +public inline fun OptionallyWithUser.inlineQueryOrNull(): InlineQuery? = this as? dev.inmo.tgbotapi.types.InlineQueries.query.InlineQuery + +public inline fun OptionallyWithUser.inlineQueryOrThrow(): InlineQuery = this as dev.inmo.tgbotapi.types.InlineQueries.query.InlineQuery + +public inline fun OptionallyWithUser.ifInlineQuery(block: (InlineQuery) -> T): T? = inlineQueryOrNull() ?.let(block) + +public inline fun OptionallyWithUser.chosenInlineResultOrNull(): ChosenInlineResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.ChosenInlineResult + +public inline fun OptionallyWithUser.chosenInlineResultOrThrow(): ChosenInlineResult = this as dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.ChosenInlineResult + +public inline fun OptionallyWithUser.ifChosenInlineResult(block: (ChosenInlineResult) -> T): T? = chosenInlineResultOrNull() ?.let(block) + +public inline fun OptionallyWithUser.locationChosenInlineResultOrNull(): LocationChosenInlineResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.LocationChosenInlineResult + +public inline fun OptionallyWithUser.locationChosenInlineResultOrThrow(): LocationChosenInlineResult = this as dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.LocationChosenInlineResult + +public inline fun OptionallyWithUser.ifLocationChosenInlineResult(block: (LocationChosenInlineResult) -> T): T? = locationChosenInlineResultOrNull() ?.let(block) + +public inline fun OptionallyWithUser.baseChosenInlineResultOrNull(): BaseChosenInlineResult? = this as? dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.BaseChosenInlineResult + +public inline fun OptionallyWithUser.baseChosenInlineResultOrThrow(): BaseChosenInlineResult = this as dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.BaseChosenInlineResult + +public inline fun OptionallyWithUser.ifBaseChosenInlineResult(block: (BaseChosenInlineResult) -> T): T? = baseChosenInlineResultOrNull() ?.let(block) + +public inline fun OptionallyWithUser.chatJoinRequestOrNull(): ChatJoinRequest? = this as? dev.inmo.tgbotapi.types.chat.ChatJoinRequest + +public inline fun OptionallyWithUser.chatJoinRequestOrThrow(): ChatJoinRequest = this as dev.inmo.tgbotapi.types.chat.ChatJoinRequest + +public inline fun OptionallyWithUser.ifChatJoinRequest(block: (ChatJoinRequest) -> T): T? = chatJoinRequestOrNull() ?.let(block) + +public inline fun OptionallyWithUser.administratorChatMemberOrNull(): AdministratorChatMember? = this as? dev.inmo.tgbotapi.types.chat.member.AdministratorChatMember + +public inline fun OptionallyWithUser.administratorChatMemberOrThrow(): AdministratorChatMember = this as dev.inmo.tgbotapi.types.chat.member.AdministratorChatMember + +public inline fun OptionallyWithUser.ifAdministratorChatMember(block: (AdministratorChatMember) -> T): T? = administratorChatMemberOrNull() ?.let(block) public inline fun OptionallyWithUser.leftChatMemberOrNull(): LeftChatMember? = this as? dev.inmo.tgbotapi.types.chat.member.LeftChatMember @@ -4270,11 +4464,17 @@ public inline fun OptionallyWithUser.leftChatMemberOrThrow(): LeftChatMember = t public inline fun OptionallyWithUser.ifLeftChatMember(block: (LeftChatMember) -> T): T? = leftChatMemberOrNull() ?.let(block) -public inline fun OptionallyWithUser.administratorChatMemberOrNull(): AdministratorChatMember? = this as? dev.inmo.tgbotapi.types.chat.member.AdministratorChatMember +public inline fun OptionallyWithUser.chatMemberUpdatedOrNull(): ChatMemberUpdated? = this as? dev.inmo.tgbotapi.types.chat.member.ChatMemberUpdated -public inline fun OptionallyWithUser.administratorChatMemberOrThrow(): AdministratorChatMember = this as dev.inmo.tgbotapi.types.chat.member.AdministratorChatMember +public inline fun OptionallyWithUser.chatMemberUpdatedOrThrow(): ChatMemberUpdated = this as dev.inmo.tgbotapi.types.chat.member.ChatMemberUpdated -public inline fun OptionallyWithUser.ifAdministratorChatMember(block: (AdministratorChatMember) -> T): T? = administratorChatMemberOrNull() ?.let(block) +public inline fun OptionallyWithUser.ifChatMemberUpdated(block: (ChatMemberUpdated) -> T): T? = chatMemberUpdatedOrNull() ?.let(block) + +public inline fun OptionallyWithUser.restrictedChatMemberOrNull(): RestrictedChatMember? = this as? dev.inmo.tgbotapi.types.chat.member.RestrictedChatMember + +public inline fun OptionallyWithUser.restrictedChatMemberOrThrow(): RestrictedChatMember = this as dev.inmo.tgbotapi.types.chat.member.RestrictedChatMember + +public inline fun OptionallyWithUser.ifRestrictedChatMember(block: (RestrictedChatMember) -> T): T? = restrictedChatMemberOrNull() ?.let(block) public inline fun OptionallyWithUser.specialRightsChatMemberOrNull(): SpecialRightsChatMember? = this as? dev.inmo.tgbotapi.types.chat.member.SpecialRightsChatMember @@ -4288,11 +4488,17 @@ public inline fun OptionallyWithUser.memberChatMemberOrThrow(): MemberChatMember public inline fun OptionallyWithUser.ifMemberChatMember(block: (MemberChatMember) -> T): T? = memberChatMemberOrNull() ?.let(block) -public inline fun OptionallyWithUser.chatMemberUpdatedOrNull(): ChatMemberUpdated? = this as? dev.inmo.tgbotapi.types.chat.member.ChatMemberUpdated +public inline fun OptionallyWithUser.subscriptionMemberChatMemberOrNull(): SubscriptionMemberChatMember? = this as? dev.inmo.tgbotapi.types.chat.member.SubscriptionMemberChatMember -public inline fun OptionallyWithUser.chatMemberUpdatedOrThrow(): ChatMemberUpdated = this as dev.inmo.tgbotapi.types.chat.member.ChatMemberUpdated +public inline fun OptionallyWithUser.subscriptionMemberChatMemberOrThrow(): SubscriptionMemberChatMember = this as dev.inmo.tgbotapi.types.chat.member.SubscriptionMemberChatMember -public inline fun OptionallyWithUser.ifChatMemberUpdated(block: (ChatMemberUpdated) -> T): T? = chatMemberUpdatedOrNull() ?.let(block) +public inline fun OptionallyWithUser.ifSubscriptionMemberChatMember(block: (SubscriptionMemberChatMember) -> T): T? = subscriptionMemberChatMemberOrNull() ?.let(block) + +public inline fun OptionallyWithUser.chatMemberOrNull(): ChatMember? = this as? dev.inmo.tgbotapi.types.chat.member.ChatMember + +public inline fun OptionallyWithUser.chatMemberOrThrow(): ChatMember = this as dev.inmo.tgbotapi.types.chat.member.ChatMember + +public inline fun OptionallyWithUser.ifChatMember(block: (ChatMember) -> T): T? = chatMemberOrNull() ?.let(block) public inline fun OptionallyWithUser.restrictedMemberChatMemberOrNull(): RestrictedMemberChatMember? = this as? dev.inmo.tgbotapi.types.chat.member.RestrictedMemberChatMember @@ -4306,113 +4512,17 @@ public inline fun OptionallyWithUser.ownerChatMemberOrThrow(): OwnerChatMember = public inline fun OptionallyWithUser.ifOwnerChatMember(block: (OwnerChatMember) -> T): T? = ownerChatMemberOrNull() ?.let(block) -public inline fun OptionallyWithUser.subscriptionMemberChatMemberOrNull(): SubscriptionMemberChatMember? = this as? dev.inmo.tgbotapi.types.chat.member.SubscriptionMemberChatMember - -public inline fun OptionallyWithUser.subscriptionMemberChatMemberOrThrow(): SubscriptionMemberChatMember = this as dev.inmo.tgbotapi.types.chat.member.SubscriptionMemberChatMember - -public inline fun OptionallyWithUser.ifSubscriptionMemberChatMember(block: (SubscriptionMemberChatMember) -> T): T? = subscriptionMemberChatMemberOrNull() ?.let(block) - public inline fun OptionallyWithUser.kickedChatMemberOrNull(): KickedChatMember? = this as? dev.inmo.tgbotapi.types.chat.member.KickedChatMember public inline fun OptionallyWithUser.kickedChatMemberOrThrow(): KickedChatMember = this as dev.inmo.tgbotapi.types.chat.member.KickedChatMember public inline fun OptionallyWithUser.ifKickedChatMember(block: (KickedChatMember) -> T): T? = kickedChatMemberOrNull() ?.let(block) -public inline fun OptionallyWithUser.chatMemberOrNull(): ChatMember? = this as? dev.inmo.tgbotapi.types.chat.member.ChatMember +public inline fun OptionallyWithUser.directMessagesTopicOrNull(): DirectMessagesTopic? = this as? dev.inmo.tgbotapi.types.chat.DirectMessagesTopic -public inline fun OptionallyWithUser.chatMemberOrThrow(): ChatMember = this as dev.inmo.tgbotapi.types.chat.member.ChatMember +public inline fun OptionallyWithUser.directMessagesTopicOrThrow(): DirectMessagesTopic = this as dev.inmo.tgbotapi.types.chat.DirectMessagesTopic -public inline fun OptionallyWithUser.ifChatMember(block: (ChatMember) -> T): T? = chatMemberOrNull() ?.let(block) - -public inline fun OptionallyWithUser.chatJoinRequestOrNull(): ChatJoinRequest? = this as? dev.inmo.tgbotapi.types.chat.ChatJoinRequest - -public inline fun OptionallyWithUser.chatJoinRequestOrThrow(): ChatJoinRequest = this as dev.inmo.tgbotapi.types.chat.ChatJoinRequest - -public inline fun OptionallyWithUser.ifChatJoinRequest(block: (ChatJoinRequest) -> T): T? = chatJoinRequestOrNull() ?.let(block) - -public inline fun OptionallyWithUser.inlineMessageIdDataCallbackQueryOrNull(): InlineMessageIdDataCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.InlineMessageIdDataCallbackQuery - -public inline fun OptionallyWithUser.inlineMessageIdDataCallbackQueryOrThrow(): InlineMessageIdDataCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.InlineMessageIdDataCallbackQuery - -public inline fun OptionallyWithUser.ifInlineMessageIdDataCallbackQuery(block: (InlineMessageIdDataCallbackQuery) -> T): T? = inlineMessageIdDataCallbackQueryOrNull() ?.let(block) - -public inline fun OptionallyWithUser.abstractMessageCallbackQueryOrNull(): AbstractMessageCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.AbstractMessageCallbackQuery - -public inline fun OptionallyWithUser.abstractMessageCallbackQueryOrThrow(): AbstractMessageCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.AbstractMessageCallbackQuery - -public inline fun OptionallyWithUser.ifAbstractMessageCallbackQuery(block: (AbstractMessageCallbackQuery) -> T): T? = abstractMessageCallbackQueryOrNull() ?.let(block) - -public inline fun OptionallyWithUser.inlineMessageIdGameShortNameCallbackQueryOrNull(): InlineMessageIdGameShortNameCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.InlineMessageIdGameShortNameCallbackQuery - -public inline fun OptionallyWithUser.inlineMessageIdGameShortNameCallbackQueryOrThrow(): InlineMessageIdGameShortNameCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.InlineMessageIdGameShortNameCallbackQuery - -public inline fun OptionallyWithUser.ifInlineMessageIdGameShortNameCallbackQuery(block: (InlineMessageIdGameShortNameCallbackQuery) -> T): T? = inlineMessageIdGameShortNameCallbackQueryOrNull() ?.let(block) - -public inline fun OptionallyWithUser.inaccessibleMessageDataCallbackQueryOrNull(): InaccessibleMessageDataCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.InaccessibleMessageDataCallbackQuery - -public inline fun OptionallyWithUser.inaccessibleMessageDataCallbackQueryOrThrow(): InaccessibleMessageDataCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.InaccessibleMessageDataCallbackQuery - -public inline fun OptionallyWithUser.ifInaccessibleMessageDataCallbackQuery(block: (InaccessibleMessageDataCallbackQuery) -> T): T? = inaccessibleMessageDataCallbackQueryOrNull() ?.let(block) - -public inline fun OptionallyWithUser.gameShortNameCallbackQueryOrNull(): GameShortNameCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.GameShortNameCallbackQuery - -public inline fun OptionallyWithUser.gameShortNameCallbackQueryOrThrow(): GameShortNameCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.GameShortNameCallbackQuery - -public inline fun OptionallyWithUser.ifGameShortNameCallbackQuery(block: (GameShortNameCallbackQuery) -> T): T? = gameShortNameCallbackQueryOrNull() ?.let(block) - -public inline fun OptionallyWithUser.callbackQueryOrNull(): CallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.CallbackQuery - -public inline fun OptionallyWithUser.callbackQueryOrThrow(): CallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.CallbackQuery - -public inline fun OptionallyWithUser.ifCallbackQuery(block: (CallbackQuery) -> T): T? = callbackQueryOrNull() ?.let(block) - -public inline fun OptionallyWithUser.unknownCallbackQueryTypeOrNull(): UnknownCallbackQueryType? = this as? dev.inmo.tgbotapi.types.queries.callback.UnknownCallbackQueryType - -public inline fun OptionallyWithUser.unknownCallbackQueryTypeOrThrow(): UnknownCallbackQueryType = this as dev.inmo.tgbotapi.types.queries.callback.UnknownCallbackQueryType - -public inline fun OptionallyWithUser.ifUnknownCallbackQueryType(block: (UnknownCallbackQueryType) -> T): T? = unknownCallbackQueryTypeOrNull() ?.let(block) - -public inline fun OptionallyWithUser.inaccessibleMessageCallbackQueryOrNull(): InaccessibleMessageCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.InaccessibleMessageCallbackQuery - -public inline fun OptionallyWithUser.inaccessibleMessageCallbackQueryOrThrow(): InaccessibleMessageCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.InaccessibleMessageCallbackQuery - -public inline fun OptionallyWithUser.ifInaccessibleMessageCallbackQuery(block: (InaccessibleMessageCallbackQuery) -> T): T? = inaccessibleMessageCallbackQueryOrNull() ?.let(block) - -public inline fun OptionallyWithUser.messageGameShortNameCallbackQueryOrNull(): MessageGameShortNameCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.MessageGameShortNameCallbackQuery - -public inline fun OptionallyWithUser.messageGameShortNameCallbackQueryOrThrow(): MessageGameShortNameCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.MessageGameShortNameCallbackQuery - -public inline fun OptionallyWithUser.ifMessageGameShortNameCallbackQuery(block: (MessageGameShortNameCallbackQuery) -> T): T? = messageGameShortNameCallbackQueryOrNull() ?.let(block) - -public inline fun OptionallyWithUser.inaccessibleMessageGameShortNameCallbackQueryOrNull(): InaccessibleMessageGameShortNameCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.InaccessibleMessageGameShortNameCallbackQuery - -public inline fun OptionallyWithUser.inaccessibleMessageGameShortNameCallbackQueryOrThrow(): InaccessibleMessageGameShortNameCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.InaccessibleMessageGameShortNameCallbackQuery - -public inline fun OptionallyWithUser.ifInaccessibleMessageGameShortNameCallbackQuery(block: (InaccessibleMessageGameShortNameCallbackQuery) -> T): T? = inaccessibleMessageGameShortNameCallbackQueryOrNull() ?.let(block) - -public inline fun OptionallyWithUser.dataCallbackQueryOrNull(): DataCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.DataCallbackQuery - -public inline fun OptionallyWithUser.dataCallbackQueryOrThrow(): DataCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.DataCallbackQuery - -public inline fun OptionallyWithUser.ifDataCallbackQuery(block: (DataCallbackQuery) -> T): T? = dataCallbackQueryOrNull() ?.let(block) - -public inline fun OptionallyWithUser.inlineMessageIdCallbackQueryOrNull(): InlineMessageIdCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.InlineMessageIdCallbackQuery - -public inline fun OptionallyWithUser.inlineMessageIdCallbackQueryOrThrow(): InlineMessageIdCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.InlineMessageIdCallbackQuery - -public inline fun OptionallyWithUser.ifInlineMessageIdCallbackQuery(block: (InlineMessageIdCallbackQuery) -> T): T? = inlineMessageIdCallbackQueryOrNull() ?.let(block) - -public inline fun OptionallyWithUser.messageCallbackQueryOrNull(): MessageCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.MessageCallbackQuery - -public inline fun OptionallyWithUser.messageCallbackQueryOrThrow(): MessageCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.MessageCallbackQuery - -public inline fun OptionallyWithUser.ifMessageCallbackQuery(block: (MessageCallbackQuery) -> T): T? = messageCallbackQueryOrNull() ?.let(block) - -public inline fun OptionallyWithUser.messageDataCallbackQueryOrNull(): MessageDataCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.MessageDataCallbackQuery - -public inline fun OptionallyWithUser.messageDataCallbackQueryOrThrow(): MessageDataCallbackQuery = this as dev.inmo.tgbotapi.types.queries.callback.MessageDataCallbackQuery - -public inline fun OptionallyWithUser.ifMessageDataCallbackQuery(block: (MessageDataCallbackQuery) -> T): T? = messageDataCallbackQueryOrNull() ?.let(block) +public inline fun OptionallyWithUser.ifDirectMessagesTopic(block: (DirectMessagesTopic) -> T): T? = directMessagesTopicOrNull() ?.let(block) public inline fun OptionallyWithUser.withUserOrNull(): WithUser? = this as? dev.inmo.tgbotapi.abstracts.WithUser @@ -4431,99 +4541,3 @@ public inline fun OptionallyWithUser.fromUserOrNull(): FromUser? = this as? dev. public inline fun OptionallyWithUser.fromUserOrThrow(): FromUser = this as dev.inmo.tgbotapi.abstracts.FromUser public inline fun OptionallyWithUser.ifFromUser(block: (FromUser) -> T): T? = fromUserOrNull() ?.let(block) - -public inline fun CommonSendInvoiceData.sendInvoiceOrNull(): SendInvoice? = this as? dev.inmo.tgbotapi.requests.send.payments.SendInvoice - -public inline fun CommonSendInvoiceData.sendInvoiceOrThrow(): SendInvoice = this as dev.inmo.tgbotapi.requests.send.payments.SendInvoice - -public inline fun CommonSendInvoiceData.ifSendInvoice(block: (SendInvoice) -> T): T? = sendInvoiceOrNull() ?.let(block) - -public inline fun CommonSendInvoiceData.createInvoiceLinkOrNull(): CreateInvoiceLink? = this as? dev.inmo.tgbotapi.requests.send.payments.CreateInvoiceLink - -public inline fun CommonSendInvoiceData.createInvoiceLinkOrThrow(): CreateInvoiceLink = this as dev.inmo.tgbotapi.requests.send.payments.CreateInvoiceLink - -public inline fun CommonSendInvoiceData.ifCreateInvoiceLink(block: (CreateInvoiceLink) -> T): T? = createInvoiceLinkOrNull() ?.let(block) - -public inline fun CommonSendInvoiceData.inputInvoiceMessageContentOrNull(): InputInvoiceMessageContent? = this as? dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputInvoiceMessageContent - -public inline fun CommonSendInvoiceData.inputInvoiceMessageContentOrThrow(): InputInvoiceMessageContent = this as dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputInvoiceMessageContent - -public inline fun CommonSendInvoiceData.ifInputInvoiceMessageContent(block: (InputInvoiceMessageContent) -> T): T? = inputInvoiceMessageContentOrNull() ?.let(block) - -public inline fun BotException.commonBotExceptionOrNull(): CommonBotException? = this as? dev.inmo.tgbotapi.bot.exceptions.CommonBotException - -public inline fun BotException.commonBotExceptionOrThrow(): CommonBotException = this as dev.inmo.tgbotapi.bot.exceptions.CommonBotException - -public inline fun BotException.ifCommonBotException(block: (CommonBotException) -> T): T? = commonBotExceptionOrNull() ?.let(block) - -public inline fun BotException.apiExceptionOrNull(): ApiException? = this as? dev.inmo.tgbotapi.bot.exceptions.ApiException - -public inline fun BotException.apiExceptionOrThrow(): ApiException = this as dev.inmo.tgbotapi.bot.exceptions.ApiException - -public inline fun BotException.ifApiException(block: (ApiException) -> T): T? = apiExceptionOrNull() ?.let(block) - -public inline fun BotException.requestExceptionOrNull(): RequestException? = this as? dev.inmo.tgbotapi.bot.exceptions.RequestException - -public inline fun BotException.requestExceptionOrThrow(): RequestException = this as dev.inmo.tgbotapi.bot.exceptions.RequestException - -public inline fun BotException.ifRequestException(block: (RequestException) -> T): T? = requestExceptionOrNull() ?.let(block) - -public inline fun BotException.commonRequestExceptionOrNull(): CommonRequestException? = this as? dev.inmo.tgbotapi.bot.exceptions.CommonRequestException - -public inline fun BotException.commonRequestExceptionOrThrow(): CommonRequestException = this as dev.inmo.tgbotapi.bot.exceptions.CommonRequestException - -public inline fun BotException.ifCommonRequestException(block: (CommonRequestException) -> T): T? = commonRequestExceptionOrNull() ?.let(block) - -public inline fun BotException.unauthorizedExceptionOrNull(): UnauthorizedException? = this as? dev.inmo.tgbotapi.bot.exceptions.UnauthorizedException - -public inline fun BotException.unauthorizedExceptionOrThrow(): UnauthorizedException = this as dev.inmo.tgbotapi.bot.exceptions.UnauthorizedException - -public inline fun BotException.ifUnauthorizedException(block: (UnauthorizedException) -> T): T? = unauthorizedExceptionOrNull() ?.let(block) - -public inline fun BotException.replyMessageNotFoundExceptionOrNull(): ReplyMessageNotFoundException? = this as? dev.inmo.tgbotapi.bot.exceptions.ReplyMessageNotFoundException - -public inline fun BotException.replyMessageNotFoundExceptionOrThrow(): ReplyMessageNotFoundException = this as dev.inmo.tgbotapi.bot.exceptions.ReplyMessageNotFoundException - -public inline fun BotException.ifReplyMessageNotFoundException(block: (ReplyMessageNotFoundException) -> T): T? = replyMessageNotFoundExceptionOrNull() ?.let(block) - -public inline fun BotException.messageIsNotModifiedExceptionOrNull(): MessageIsNotModifiedException? = this as? dev.inmo.tgbotapi.bot.exceptions.MessageIsNotModifiedException - -public inline fun BotException.messageIsNotModifiedExceptionOrThrow(): MessageIsNotModifiedException = this as dev.inmo.tgbotapi.bot.exceptions.MessageIsNotModifiedException - -public inline fun BotException.ifMessageIsNotModifiedException(block: (MessageIsNotModifiedException) -> T): T? = messageIsNotModifiedExceptionOrNull() ?.let(block) - -public inline fun BotException.messageToEditNotFoundExceptionOrNull(): MessageToEditNotFoundException? = this as? dev.inmo.tgbotapi.bot.exceptions.MessageToEditNotFoundException - -public inline fun BotException.messageToEditNotFoundExceptionOrThrow(): MessageToEditNotFoundException = this as dev.inmo.tgbotapi.bot.exceptions.MessageToEditNotFoundException - -public inline fun BotException.ifMessageToEditNotFoundException(block: (MessageToEditNotFoundException) -> T): T? = messageToEditNotFoundExceptionOrNull() ?.let(block) - -public inline fun BotException.invalidPhotoDimensionsExceptionOrNull(): InvalidPhotoDimensionsException? = this as? dev.inmo.tgbotapi.bot.exceptions.InvalidPhotoDimensionsException - -public inline fun BotException.invalidPhotoDimensionsExceptionOrThrow(): InvalidPhotoDimensionsException = this as dev.inmo.tgbotapi.bot.exceptions.InvalidPhotoDimensionsException - -public inline fun BotException.ifInvalidPhotoDimensionsException(block: (InvalidPhotoDimensionsException) -> T): T? = invalidPhotoDimensionsExceptionOrNull() ?.let(block) - -public inline fun BotException.wrongFileIdentifierExceptionOrNull(): WrongFileIdentifierException? = this as? dev.inmo.tgbotapi.bot.exceptions.WrongFileIdentifierException - -public inline fun BotException.wrongFileIdentifierExceptionOrThrow(): WrongFileIdentifierException = this as dev.inmo.tgbotapi.bot.exceptions.WrongFileIdentifierException - -public inline fun BotException.ifWrongFileIdentifierException(block: (WrongFileIdentifierException) -> T): T? = wrongFileIdentifierExceptionOrNull() ?.let(block) - -public inline fun BotException.tooMuchRequestsExceptionOrNull(): TooMuchRequestsException? = this as? dev.inmo.tgbotapi.bot.exceptions.TooMuchRequestsException - -public inline fun BotException.tooMuchRequestsExceptionOrThrow(): TooMuchRequestsException = this as dev.inmo.tgbotapi.bot.exceptions.TooMuchRequestsException - -public inline fun BotException.ifTooMuchRequestsException(block: (TooMuchRequestsException) -> T): T? = tooMuchRequestsExceptionOrNull() ?.let(block) - -public inline fun BotException.getUpdatesConflictOrNull(): GetUpdatesConflict? = this as? dev.inmo.tgbotapi.bot.exceptions.GetUpdatesConflict - -public inline fun BotException.getUpdatesConflictOrThrow(): GetUpdatesConflict = this as dev.inmo.tgbotapi.bot.exceptions.GetUpdatesConflict - -public inline fun BotException.ifGetUpdatesConflict(block: (GetUpdatesConflict) -> T): T? = getUpdatesConflictOrNull() ?.let(block) - -public inline fun BotException.commonBotExceptionDefaultOrNull(): CommonBotException.Default? = this as? dev.inmo.tgbotapi.bot.exceptions.CommonBotException.Default - -public inline fun BotException.commonBotExceptionDefaultOrThrow(): CommonBotException.Default = this as dev.inmo.tgbotapi.bot.exceptions.CommonBotException.Default - -public inline fun BotException.ifCommonBotExceptionDefault(block: (CommonBotException.Default) -> T): T? = commonBotExceptionDefaultOrNull() ?.let(block)