commonMain.dev.inmo.tgbotapi.extensions.utils.ClassCastsNew.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tgbotapi.utils Show documentation
Show all versions of tgbotapi.utils Show documentation
Additional extensions for core part of tgbotapi
@file:Suppress(
"unused",
"RemoveRedundantQualifierName",
"RedundantVisibilityModifier",
"NOTHING_TO_INLINE",
"UNCHECKED_CAST",
"OPT_IN_USAGE",
)
package dev.inmo.tgbotapi.extensions.utils
import dev.inmo.tgbotapi.abstracts.CommonSendInvoiceData
import dev.inmo.tgbotapi.abstracts.FromUser
import dev.inmo.tgbotapi.abstracts.OptionallyFromUser
import dev.inmo.tgbotapi.abstracts.OptionallyWithUser
import dev.inmo.tgbotapi.abstracts.WithUser
import dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton
import dev.inmo.tgbotapi.requests.send.payments.CreateInvoiceLink
import dev.inmo.tgbotapi.requests.send.payments.SendInvoice
import dev.inmo.tgbotapi.requests.stickers.InputSticker
import dev.inmo.tgbotapi.types.BackgroundFill
import dev.inmo.tgbotapi.types.BackgroundType
import dev.inmo.tgbotapi.types.BusinessChatId
import dev.inmo.tgbotapi.types.ChatId
import dev.inmo.tgbotapi.types.ChatIdWithThreadId
import dev.inmo.tgbotapi.types.ChatIdentifier
import dev.inmo.tgbotapi.types.ChatInviteLink
import dev.inmo.tgbotapi.types.ChatInviteLinkUnlimited
import dev.inmo.tgbotapi.types.ChatInviteLinkWithJoinRequest
import dev.inmo.tgbotapi.types.ChatInviteLinkWithLimitedMembers
import dev.inmo.tgbotapi.types.IdChatIdentifier
import dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.BaseChosenInlineResult
import dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.ChosenInlineResult
import dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.LocationChosenInlineResult
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultArticle
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultContact
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultGame
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultLocation
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultStickerCached
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultVenue
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.DescribedInlineQueryResult
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.FileInlineQueryResult
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.OptionallyTitledInlineQueryResult
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.SizedInlineQueryResult
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.ThumbSizedInlineQueryResult
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.ThumbedInlineQueryResult
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.ThumbedWithMimeTypeInlineQueryResult
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.TitledInlineQueryResult
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.UrlInlineQueryResult
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.WithCustomizableCaptionInlineQueryResult
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.WithInputMessageContentInlineQueryResult
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.audio.InlineQueryResultAudio
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.audio.InlineQueryResultAudioCached
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.audio.InlineQueryResultAudioCommon
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.document.InlineQueryResultDocument
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.document.InlineQueryResultDocumentCached
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.document.InlineQueryResultDocumentCommon
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGif
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGifCached
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGifCommon
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif.InlineQueryResultMpeg4Gif
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif.InlineQueryResultMpeg4GifCached
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif.InlineQueryResultMpeg4GifCommon
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.photo.InlineQueryResultPhoto
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.photo.InlineQueryResultPhotoCached
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.photo.InlineQueryResultPhotoCommon
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.InlineQueryResultVideo
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.InlineQueryResultVideoCached
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.video.InlineQueryResultVideoCommon
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.InlineQueryResultVoice
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.InlineQueryResultVoiceCached
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.voice.InlineQueryResultVoiceCommon
import dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputContactMessageContent
import dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputInvoiceMessageContent
import dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputLocationMessageContent
import dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputMessageContent
import dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputTextMessageContent
import dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputVenueMessageContent
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.PrimaryInviteLink
import dev.inmo.tgbotapi.types.ReplyInfo
import dev.inmo.tgbotapi.types.SecondaryChatInviteLink
import dev.inmo.tgbotapi.types.Username
import dev.inmo.tgbotapi.types.actions.BotAction
import dev.inmo.tgbotapi.types.actions.ChooseStickerAction
import dev.inmo.tgbotapi.types.actions.CustomBotAction
import dev.inmo.tgbotapi.types.actions.FindLocationAction
import dev.inmo.tgbotapi.types.actions.RecordVideoAction
import dev.inmo.tgbotapi.types.actions.RecordVideoNoteAction
import dev.inmo.tgbotapi.types.actions.RecordVoiceAction
import dev.inmo.tgbotapi.types.actions.TypingAction
import dev.inmo.tgbotapi.types.actions.UploadDocumentAction
import dev.inmo.tgbotapi.types.actions.UploadPhotoAction
import dev.inmo.tgbotapi.types.actions.UploadVideoAction
import dev.inmo.tgbotapi.types.actions.UploadVideoNoteAction
import dev.inmo.tgbotapi.types.actions.UploadVoiceAction
import dev.inmo.tgbotapi.types.boosts.ChatBoostSource
import dev.inmo.tgbotapi.types.business_connection.BusinessConnection
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CallbackDataInlineKeyboardButton
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CallbackGameInlineKeyboardButton
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.InlineKeyboardButton
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.LoginURLInlineKeyboardButton
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.PayInlineKeyboardButton
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.SwitchInlineQueryChosenChatInlineKeyboardButton
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.SwitchInlineQueryCurrentChatInlineKeyboardButton
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.SwitchInlineQueryInlineKeyboardButton
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.URLInlineKeyboardButton
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.UnknownInlineKeyboardButton
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.WebAppInlineKeyboardButton
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.buttons.ReplyForce
import dev.inmo.tgbotapi.types.buttons.ReplyKeyboardMarkup
import dev.inmo.tgbotapi.types.buttons.ReplyKeyboardRemove
import dev.inmo.tgbotapi.types.chat.AbleToAddInAttachmentMenuChat
import dev.inmo.tgbotapi.types.chat.Bot
import dev.inmo.tgbotapi.types.chat.BusinessChat
import dev.inmo.tgbotapi.types.chat.ChannelChat
import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.chat.ChatBackground
import dev.inmo.tgbotapi.types.chat.ChatJoinRequest
import dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated
import dev.inmo.tgbotapi.types.chat.CommonBot
import dev.inmo.tgbotapi.types.chat.CommonUser
import dev.inmo.tgbotapi.types.chat.ExtendedBot
import dev.inmo.tgbotapi.types.chat.ExtendedBusinessChat
import dev.inmo.tgbotapi.types.chat.ExtendedChannelChat
import dev.inmo.tgbotapi.types.chat.ExtendedChat
import dev.inmo.tgbotapi.types.chat.ExtendedChatWithUsername
import dev.inmo.tgbotapi.types.chat.ExtendedForumChat
import dev.inmo.tgbotapi.types.chat.ExtendedGroupChat
import dev.inmo.tgbotapi.types.chat.ExtendedNonBotChat
import dev.inmo.tgbotapi.types.chat.ExtendedPrivateChat
import dev.inmo.tgbotapi.types.chat.ExtendedPublicChat
import dev.inmo.tgbotapi.types.chat.ExtendedSupergroupChat
import dev.inmo.tgbotapi.types.chat.ForumChat
import dev.inmo.tgbotapi.types.chat.GroupChat
import dev.inmo.tgbotapi.types.chat.PossiblyPremiumChat
import dev.inmo.tgbotapi.types.chat.PreviewBot
import dev.inmo.tgbotapi.types.chat.PreviewBusinessChat
import dev.inmo.tgbotapi.types.chat.PreviewChannelChat
import dev.inmo.tgbotapi.types.chat.PreviewChat
import dev.inmo.tgbotapi.types.chat.PreviewForumChat
import dev.inmo.tgbotapi.types.chat.PreviewGroupChat
import dev.inmo.tgbotapi.types.chat.PreviewPrivateChat
import dev.inmo.tgbotapi.types.chat.PreviewPublicChat
import dev.inmo.tgbotapi.types.chat.PreviewSuperPublicChat
import dev.inmo.tgbotapi.types.chat.PreviewSupergroupChat
import dev.inmo.tgbotapi.types.chat.PreviewUser
import dev.inmo.tgbotapi.types.chat.PreviewUsernameChat
import dev.inmo.tgbotapi.types.chat.PrivateChat
import dev.inmo.tgbotapi.types.chat.PublicChat
import dev.inmo.tgbotapi.types.chat.SuperPublicChat
import dev.inmo.tgbotapi.types.chat.SupergroupChat
import dev.inmo.tgbotapi.types.chat.UnknownChatType
import dev.inmo.tgbotapi.types.chat.UnknownExtendedChat
import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.types.chat.UsernameChat
import dev.inmo.tgbotapi.types.chat.member.AdministratorChatMember
import dev.inmo.tgbotapi.types.chat.member.ChatMember
import dev.inmo.tgbotapi.types.chat.member.ChatMemberUpdated
import dev.inmo.tgbotapi.types.chat.member.KickedChatMember
import dev.inmo.tgbotapi.types.chat.member.LeftChatMember
import dev.inmo.tgbotapi.types.chat.member.MemberChatMember
import dev.inmo.tgbotapi.types.chat.member.OwnerChatMember
import dev.inmo.tgbotapi.types.chat.member.RestrictedChatMember
import dev.inmo.tgbotapi.types.chat.member.RestrictedMemberChatMember
import dev.inmo.tgbotapi.types.chat.member.SpecialRightsChatMember
import dev.inmo.tgbotapi.types.chat.member.SubscriptionMemberChatMember
import dev.inmo.tgbotapi.types.dice.BasketballDiceAnimationType
import dev.inmo.tgbotapi.types.dice.BowlingDiceAnimationType
import dev.inmo.tgbotapi.types.dice.CubeDiceAnimationType
import dev.inmo.tgbotapi.types.dice.CustomDiceAnimationType
import dev.inmo.tgbotapi.types.dice.DartsDiceAnimationType
import dev.inmo.tgbotapi.types.dice.DiceAnimationType
import dev.inmo.tgbotapi.types.dice.FootballDiceAnimationType
import dev.inmo.tgbotapi.types.dice.SlotMachineDiceAnimationType
import dev.inmo.tgbotapi.types.files.AnimatedSticker
import dev.inmo.tgbotapi.types.files.AnimationFile
import dev.inmo.tgbotapi.types.files.AudioFile
import dev.inmo.tgbotapi.types.files.CustomEmojiAnimatedSticker
import dev.inmo.tgbotapi.types.files.CustomEmojiSimpleSticker
import dev.inmo.tgbotapi.types.files.CustomEmojiSticker
import dev.inmo.tgbotapi.types.files.CustomEmojiVideoSticker
import dev.inmo.tgbotapi.types.files.DocumentFile
import dev.inmo.tgbotapi.types.files.File
import dev.inmo.tgbotapi.types.files.MaskAnimatedSticker
import dev.inmo.tgbotapi.types.files.MaskSimpleSticker
import dev.inmo.tgbotapi.types.files.MaskSticker
import dev.inmo.tgbotapi.types.files.MaskVideoSticker
import dev.inmo.tgbotapi.types.files.MediaContentVariant
import dev.inmo.tgbotapi.types.files.MimedMediaFile
import dev.inmo.tgbotapi.types.files.PassportFile
import dev.inmo.tgbotapi.types.files.PathedFile
import dev.inmo.tgbotapi.types.files.PhotoFile
import dev.inmo.tgbotapi.types.files.PhotoSize
import dev.inmo.tgbotapi.types.files.PlayableMediaFile
import dev.inmo.tgbotapi.types.files.RegularAnimatedSticker
import dev.inmo.tgbotapi.types.files.RegularSimpleSticker
import dev.inmo.tgbotapi.types.files.RegularSticker
import dev.inmo.tgbotapi.types.files.RegularVideoSticker
import dev.inmo.tgbotapi.types.files.SizedMediaFile
import dev.inmo.tgbotapi.types.files.Sticker
import dev.inmo.tgbotapi.types.files.TelegramMediaFile
import dev.inmo.tgbotapi.types.files.ThumbedMediaFile
import dev.inmo.tgbotapi.types.files.UnknownSticker
import dev.inmo.tgbotapi.types.files.UsefulAsPaidMediaFile
import dev.inmo.tgbotapi.types.files.VideoFile
import dev.inmo.tgbotapi.types.files.VideoNoteFile
import dev.inmo.tgbotapi.types.files.VideoSticker
import dev.inmo.tgbotapi.types.files.VoiceFile
import dev.inmo.tgbotapi.types.giveaway.GiveawayCreated
import dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults
import dev.inmo.tgbotapi.types.location.LiveLocation
import dev.inmo.tgbotapi.types.location.Location
import dev.inmo.tgbotapi.types.location.StaticLocation
import dev.inmo.tgbotapi.types.media.AudioMediaGroupMemberTelegramMedia
import dev.inmo.tgbotapi.types.media.DocumentMediaGroupMemberTelegramMedia
import dev.inmo.tgbotapi.types.media.DuratedTelegramMedia
import dev.inmo.tgbotapi.types.media.MediaGroupMemberTelegramMedia
import dev.inmo.tgbotapi.types.media.SizedTelegramMedia
import dev.inmo.tgbotapi.types.media.SpoilerableTelegramMedia
import dev.inmo.tgbotapi.types.media.TelegramFreeMedia
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.TelegramMediaPhoto
import dev.inmo.tgbotapi.types.media.TelegramMediaVideo
import dev.inmo.tgbotapi.types.media.TelegramPaidMedia
import dev.inmo.tgbotapi.types.media.TelegramPaidMediaPhoto
import dev.inmo.tgbotapi.types.media.TelegramPaidMediaVideo
import dev.inmo.tgbotapi.types.media.ThumbedTelegramMedia
import dev.inmo.tgbotapi.types.media.TitledTelegramMedia
import dev.inmo.tgbotapi.types.media.VisualMediaGroupMemberTelegramMedia
import dev.inmo.tgbotapi.types.media.VisualTelegramPaidMedia
import dev.inmo.tgbotapi.types.media.WithCustomizableCaptionTelegramMedia
import dev.inmo.tgbotapi.types.message.ChannelEventMessage
import dev.inmo.tgbotapi.types.message.ChatEvents.ChannelChatCreated
import dev.inmo.tgbotapi.types.message.ChatEvents.ChatBoostAdded
import dev.inmo.tgbotapi.types.message.ChatEvents.DeleteChatPhoto
import dev.inmo.tgbotapi.types.message.ChatEvents.GroupChatCreated
import dev.inmo.tgbotapi.types.message.ChatEvents.LeftChatMemberEvent
import dev.inmo.tgbotapi.types.message.ChatEvents.MessageAutoDeleteTimerChanged
import dev.inmo.tgbotapi.types.message.ChatEvents.MigratedToSupergroup
import dev.inmo.tgbotapi.types.message.ChatEvents.NewChatMembers
import dev.inmo.tgbotapi.types.message.ChatEvents.NewChatPhoto
import dev.inmo.tgbotapi.types.message.ChatEvents.NewChatTitle
import dev.inmo.tgbotapi.types.message.ChatEvents.PinnedMessage
import dev.inmo.tgbotapi.types.message.ChatEvents.ProximityAlertTriggered
import dev.inmo.tgbotapi.types.message.ChatEvents.SupergroupChatCreated
import dev.inmo.tgbotapi.types.message.ChatEvents.UserLoggedIn
import dev.inmo.tgbotapi.types.message.ChatEvents.WebAppData
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ChannelEvent
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ChatEvent
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.CommonEvent
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ForumEvent
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.GroupEvent
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.PrivateEvent
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.PublicChatEvent
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.SupergroupEvent
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.VideoChatEvent
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicClosed
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicCreated
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicEdited
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicReopened
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicHidden
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.GeneralForumTopicUnhidden
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.WriteAccessAllowed
import dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatEnded
import dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatParticipantsInvited
import dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatScheduled
import dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatStarted
import dev.inmo.tgbotapi.types.message.CommonGroupEventMessage
import dev.inmo.tgbotapi.types.message.CommonSupergroupEventMessage
import dev.inmo.tgbotapi.types.message.ForwardInfo
import dev.inmo.tgbotapi.types.message.PassportMessage
import dev.inmo.tgbotapi.types.message.PrivateEventMessage
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
import dev.inmo.tgbotapi.types.message.abstracts.AnonymousForumContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.AnonymousGroupContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.BusinessContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.ChannelContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.ChatEventMessage
import dev.inmo.tgbotapi.types.message.abstracts.CommonForumContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.CommonGroupContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.abstracts.ConnectedFromChannelGroupContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.ForumContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.FromChannelForumContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.FromChannelGroupContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.FromUserMessage
import dev.inmo.tgbotapi.types.message.abstracts.GroupContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.GroupEventMessage
import dev.inmo.tgbotapi.types.message.abstracts.InaccessibleMessage
import dev.inmo.tgbotapi.types.message.abstracts.Message
import dev.inmo.tgbotapi.types.message.abstracts.OptionallyFromUserMessage
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyEditedMessage
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyForwardedMessage
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyMediaGroupMessage
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyOfflineMessage
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyPaymentMessage
import dev.inmo.tgbotapi.types.message.abstracts.PossiblySentViaBotCommonMessage
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyTopicMessage
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyWithEffectMessage
import dev.inmo.tgbotapi.types.message.abstracts.PotentiallyFromUserGroupContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.PrivateContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.PublicContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.SignedMessage
import dev.inmo.tgbotapi.types.message.abstracts.SupergroupEventMessage
import dev.inmo.tgbotapi.types.message.abstracts.UnconnectedFromChannelGroupContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.UnknownMessageType
import dev.inmo.tgbotapi.types.message.content.AnimationContent
import dev.inmo.tgbotapi.types.message.content.AudioContent
import dev.inmo.tgbotapi.types.message.content.AudioMediaGroupPartContent
import dev.inmo.tgbotapi.types.message.content.ContactContent
import dev.inmo.tgbotapi.types.message.content.DiceContent
import dev.inmo.tgbotapi.types.message.content.DocumentContent
import dev.inmo.tgbotapi.types.message.content.DocumentMediaGroupPartContent
import dev.inmo.tgbotapi.types.message.content.GameContent
import dev.inmo.tgbotapi.types.message.content.GiveawayContent
import dev.inmo.tgbotapi.types.message.content.GiveawayPublicResultsContent
import dev.inmo.tgbotapi.types.message.content.InvoiceContent
import dev.inmo.tgbotapi.types.message.content.LiveLocationContent
import dev.inmo.tgbotapi.types.message.content.LocationContent
import dev.inmo.tgbotapi.types.message.content.MediaCollectionContent
import dev.inmo.tgbotapi.types.message.content.MediaContent
import dev.inmo.tgbotapi.types.message.content.MediaGroupCollectionContent
import dev.inmo.tgbotapi.types.message.content.MediaGroupContent
import dev.inmo.tgbotapi.types.message.content.MediaGroupPartContent
import dev.inmo.tgbotapi.types.message.content.MessageContent
import dev.inmo.tgbotapi.types.message.content.PaidMediaInfoContent
import dev.inmo.tgbotapi.types.message.content.PhotoContent
import dev.inmo.tgbotapi.types.message.content.PollContent
import dev.inmo.tgbotapi.types.message.content.ResendableContent
import dev.inmo.tgbotapi.types.message.content.SpoilerableMediaContent
import dev.inmo.tgbotapi.types.message.content.StaticLocationContent
import dev.inmo.tgbotapi.types.message.content.StickerContent
import dev.inmo.tgbotapi.types.message.content.StoryContent
import dev.inmo.tgbotapi.types.message.content.TextContent
import dev.inmo.tgbotapi.types.message.content.TextedContent
import dev.inmo.tgbotapi.types.message.content.TextedMediaContent
import dev.inmo.tgbotapi.types.message.content.VenueContent
import dev.inmo.tgbotapi.types.message.content.VideoContent
import dev.inmo.tgbotapi.types.message.content.VideoNoteContent
import dev.inmo.tgbotapi.types.message.content.VisualMediaGroupPartContent
import dev.inmo.tgbotapi.types.message.content.VoiceContent
import dev.inmo.tgbotapi.types.message.content.WithCustomizedCaptionMediaContent
import dev.inmo.tgbotapi.types.message.payments.PaidMediaPurchased
import dev.inmo.tgbotapi.types.message.payments.RefundedPaymentEvent
import dev.inmo.tgbotapi.types.message.payments.SuccessfulPaymentEvent
import dev.inmo.tgbotapi.types.message.textsources.BlockquoteTextSource
import dev.inmo.tgbotapi.types.message.textsources.BoldTextSource
import dev.inmo.tgbotapi.types.message.textsources.BotCommandTextSource
import dev.inmo.tgbotapi.types.message.textsources.CashTagTextSource
import dev.inmo.tgbotapi.types.message.textsources.CodeTextSource
import dev.inmo.tgbotapi.types.message.textsources.CustomEmojiTextSource
import dev.inmo.tgbotapi.types.message.textsources.EMailTextSource
import dev.inmo.tgbotapi.types.message.textsources.ExpandableBlockquoteTextSource
import dev.inmo.tgbotapi.types.message.textsources.HashTagTextSource
import dev.inmo.tgbotapi.types.message.textsources.ItalicTextSource
import dev.inmo.tgbotapi.types.message.textsources.MentionTextSource
import dev.inmo.tgbotapi.types.message.textsources.MultilevelTextSource
import dev.inmo.tgbotapi.types.message.textsources.PhoneNumberTextSource
import dev.inmo.tgbotapi.types.message.textsources.PreTextSource
import dev.inmo.tgbotapi.types.message.textsources.RegularTextSource
import dev.inmo.tgbotapi.types.message.textsources.SpoilerTextSource
import dev.inmo.tgbotapi.types.message.textsources.StrikethroughTextSource
import dev.inmo.tgbotapi.types.message.textsources.TextLinkTextSource
import dev.inmo.tgbotapi.types.message.textsources.TextMentionTextSource
import dev.inmo.tgbotapi.types.message.textsources.TextSource
import dev.inmo.tgbotapi.types.message.textsources.URLTextSource
import dev.inmo.tgbotapi.types.message.textsources.UnderlineTextSource
import dev.inmo.tgbotapi.types.passport.PassportElementError
import dev.inmo.tgbotapi.types.passport.PassportElementErrorDataField
import dev.inmo.tgbotapi.types.passport.PassportElementErrorFile
import dev.inmo.tgbotapi.types.passport.PassportElementErrorFiles
import dev.inmo.tgbotapi.types.passport.PassportElementErrorFrontSide
import dev.inmo.tgbotapi.types.passport.PassportElementErrorReverseSide
import dev.inmo.tgbotapi.types.passport.PassportElementErrorSelfie
import dev.inmo.tgbotapi.types.passport.PassportElementErrorTranslationFile
import dev.inmo.tgbotapi.types.passport.PassportElementErrorTranslationFiles
import dev.inmo.tgbotapi.types.passport.PassportElementErrorUnspecified
import dev.inmo.tgbotapi.types.passport.PassportElementFileError
import dev.inmo.tgbotapi.types.passport.PassportElementFilesError
import dev.inmo.tgbotapi.types.passport.PassportMultipleElementsError
import dev.inmo.tgbotapi.types.passport.PassportSingleElementError
import dev.inmo.tgbotapi.types.passport.UnknownPassportElementError
import dev.inmo.tgbotapi.types.passport.decrypted.AddressSecureValue
import dev.inmo.tgbotapi.types.passport.decrypted.BankStatementSecureValue
import dev.inmo.tgbotapi.types.passport.decrypted.CommonPassportSecureValue
import dev.inmo.tgbotapi.types.passport.decrypted.DriverLicenseSecureValue
import dev.inmo.tgbotapi.types.passport.decrypted.IdentityCardSecureValue
import dev.inmo.tgbotapi.types.passport.decrypted.IdentityWithReverseSideSecureValue
import dev.inmo.tgbotapi.types.passport.decrypted.InternalPassportSecureValue
import dev.inmo.tgbotapi.types.passport.decrypted.OtherDocumentsSecureValue
import dev.inmo.tgbotapi.types.passport.decrypted.PassportRegistrationSecureValue
import dev.inmo.tgbotapi.types.passport.decrypted.PassportSecureValue
import dev.inmo.tgbotapi.types.passport.decrypted.PersonalDetailsSecureValue
import dev.inmo.tgbotapi.types.passport.decrypted.RentalAgreementSecureValue
import dev.inmo.tgbotapi.types.passport.decrypted.TemporalRegistrationSecureValue
import dev.inmo.tgbotapi.types.passport.decrypted.UtilityBillSecureValue
import dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValue
import dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueIdentity
import dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithData
import dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithFiles
import dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithReverseSide
import dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithTranslations
import dev.inmo.tgbotapi.types.passport.encrypted.BankStatement
import dev.inmo.tgbotapi.types.passport.encrypted.CommonPassport
import dev.inmo.tgbotapi.types.passport.encrypted.DriverLicense
import dev.inmo.tgbotapi.types.passport.encrypted.Email
import dev.inmo.tgbotapi.types.passport.encrypted.EncryptedAddress
import dev.inmo.tgbotapi.types.passport.encrypted.EncryptedPassportElementWithTranslatableFilesCollection
import dev.inmo.tgbotapi.types.passport.encrypted.EncryptedPassportElementWithTranslatableIDDocument
import dev.inmo.tgbotapi.types.passport.encrypted.EncryptedPersonalDetails
import dev.inmo.tgbotapi.types.passport.encrypted.IdentityCard
import dev.inmo.tgbotapi.types.passport.encrypted.InternalPassport
import dev.inmo.tgbotapi.types.passport.encrypted.Passport
import dev.inmo.tgbotapi.types.passport.encrypted.PassportRegistration
import dev.inmo.tgbotapi.types.passport.encrypted.PhoneNumber
import dev.inmo.tgbotapi.types.passport.encrypted.RentalAgreement
import dev.inmo.tgbotapi.types.passport.encrypted.TemporaryRegistration
import dev.inmo.tgbotapi.types.passport.encrypted.UtilityBill
import dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElement
import dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementTranslatable
import dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithData
import dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithEmail
import dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithFilesCollection
import dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithFrontSide
import dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithPhoneNumber
import dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithReverseSide
import dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElementWithSelfie
import dev.inmo.tgbotapi.types.passport.encrypted.abstracts.UnknownEncryptedPassportElement
import dev.inmo.tgbotapi.types.payments.PreCheckoutQuery
import dev.inmo.tgbotapi.types.payments.ShippingQuery
import dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState
import dev.inmo.tgbotapi.types.payments.stars.StarTransaction
import dev.inmo.tgbotapi.types.payments.stars.TransactionPartner
import dev.inmo.tgbotapi.types.polls.ApproximateScheduledCloseInfo
import dev.inmo.tgbotapi.types.polls.ExactScheduledCloseInfo
import dev.inmo.tgbotapi.types.polls.MultipleAnswersPoll
import dev.inmo.tgbotapi.types.polls.Poll
import dev.inmo.tgbotapi.types.polls.PollAnswer
import dev.inmo.tgbotapi.types.polls.QuizPoll
import dev.inmo.tgbotapi.types.polls.RegularPoll
import dev.inmo.tgbotapi.types.polls.ScheduledCloseInfo
import dev.inmo.tgbotapi.types.polls.UnknownPollType
import dev.inmo.tgbotapi.types.queries.callback.AbstractMessageCallbackQuery
import dev.inmo.tgbotapi.types.queries.callback.CallbackQuery
import dev.inmo.tgbotapi.types.queries.callback.DataCallbackQuery
import dev.inmo.tgbotapi.types.queries.callback.GameShortNameCallbackQuery
import dev.inmo.tgbotapi.types.queries.callback.InaccessibleMessageCallbackQuery
import dev.inmo.tgbotapi.types.queries.callback.InaccessibleMessageDataCallbackQuery
import dev.inmo.tgbotapi.types.queries.callback.InaccessibleMessageGameShortNameCallbackQuery
import dev.inmo.tgbotapi.types.queries.callback.InlineMessageIdCallbackQuery
import dev.inmo.tgbotapi.types.queries.callback.InlineMessageIdDataCallbackQuery
import dev.inmo.tgbotapi.types.queries.callback.InlineMessageIdGameShortNameCallbackQuery
import dev.inmo.tgbotapi.types.queries.callback.MessageCallbackQuery
import dev.inmo.tgbotapi.types.queries.callback.MessageDataCallbackQuery
import dev.inmo.tgbotapi.types.queries.callback.MessageGameShortNameCallbackQuery
import dev.inmo.tgbotapi.types.queries.callback.UnknownCallbackQueryType
import dev.inmo.tgbotapi.types.reactions.Reaction
import dev.inmo.tgbotapi.types.request.ChatShared
import dev.inmo.tgbotapi.types.request.ChatSharedRequest
import dev.inmo.tgbotapi.types.request.RequestResponse
import dev.inmo.tgbotapi.types.request.UsersShared
import dev.inmo.tgbotapi.types.update.BusinessConnectionUpdate
import dev.inmo.tgbotapi.types.update.BusinessMessageUpdate
import dev.inmo.tgbotapi.types.update.CallbackQueryUpdate
import dev.inmo.tgbotapi.types.update.ChannelPostUpdate
import dev.inmo.tgbotapi.types.update.ChatBoostRemovedUpdate
import dev.inmo.tgbotapi.types.update.ChatBoostUpdatedUpdate
import dev.inmo.tgbotapi.types.update.ChatJoinRequestUpdate
import dev.inmo.tgbotapi.types.update.ChatMessageReactionUpdatedUpdate
import dev.inmo.tgbotapi.types.update.ChatMessageReactionsCountUpdatedUpdate
import dev.inmo.tgbotapi.types.update.ChosenInlineResultUpdate
import dev.inmo.tgbotapi.types.update.CommonChatMemberUpdatedUpdate
import dev.inmo.tgbotapi.types.update.DeletedBusinessMessageUpdate
import dev.inmo.tgbotapi.types.update.EditBusinessMessageUpdate
import dev.inmo.tgbotapi.types.update.EditChannelPostUpdate
import dev.inmo.tgbotapi.types.update.EditMessageUpdate
import dev.inmo.tgbotapi.types.update.InlineQueryUpdate
import dev.inmo.tgbotapi.types.update.MessageUpdate
import dev.inmo.tgbotapi.types.update.MyChatMemberUpdatedUpdate
import dev.inmo.tgbotapi.types.update.PaidMediaPurchasedUpdate
import dev.inmo.tgbotapi.types.update.PollAnswerUpdate
import dev.inmo.tgbotapi.types.update.PollUpdate
import dev.inmo.tgbotapi.types.update.PreCheckoutQueryUpdate
import dev.inmo.tgbotapi.types.update.ShippingQueryUpdate
import dev.inmo.tgbotapi.types.update.abstracts.BaseEditMessageUpdate
import dev.inmo.tgbotapi.types.update.abstracts.BaseMessageUpdate
import dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate
import dev.inmo.tgbotapi.types.update.abstracts.ChatMemberUpdatedUpdate
import dev.inmo.tgbotapi.types.update.abstracts.UnknownUpdate
import dev.inmo.tgbotapi.types.update.abstracts.Update
import kotlin.Suppress
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.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.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 OptionallyWithUser.optionallyFromUserOrNull(): OptionallyFromUser? = this as?
dev.inmo.tgbotapi.abstracts.OptionallyFromUser
public inline fun OptionallyWithUser.optionallyFromUserOrThrow(): OptionallyFromUser = this as
dev.inmo.tgbotapi.abstracts.OptionallyFromUser
public inline fun OptionallyWithUser.ifOptionallyFromUser(block: (OptionallyFromUser) -> T): T?
= optionallyFromUserOrNull() ?.let(block)
public inline fun OptionallyWithUser.fromUserOrNull(): FromUser? = this as?
dev.inmo.tgbotapi.abstracts.FromUser
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 OptionallyWithUser.withUserOrNull(): WithUser? = this as?
dev.inmo.tgbotapi.abstracts.WithUser
public inline fun OptionallyWithUser.withUserOrThrow(): WithUser = this as
dev.inmo.tgbotapi.abstracts.WithUser
public inline fun OptionallyWithUser.ifWithUser(block: (WithUser) -> T): T? = withUserOrNull()
?.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
public inline fun OptionallyWithUser.ifChatInviteLink(block: (ChatInviteLink) -> T): T? =
chatInviteLinkOrNull() ?.let(block)
public inline fun OptionallyWithUser.secondaryChatInviteLinkOrNull(): SecondaryChatInviteLink? =
this as? dev.inmo.tgbotapi.types.SecondaryChatInviteLink
public inline fun OptionallyWithUser.secondaryChatInviteLinkOrThrow(): SecondaryChatInviteLink =
this as dev.inmo.tgbotapi.types.SecondaryChatInviteLink
public inline fun
OptionallyWithUser.ifSecondaryChatInviteLink(block: (SecondaryChatInviteLink) -> T): T? =
secondaryChatInviteLinkOrNull() ?.let(block)
public inline fun OptionallyWithUser.primaryInviteLinkOrNull(): PrimaryInviteLink? = this as?
dev.inmo.tgbotapi.types.PrimaryInviteLink
public inline fun OptionallyWithUser.primaryInviteLinkOrThrow(): PrimaryInviteLink = this as
dev.inmo.tgbotapi.types.PrimaryInviteLink
public inline fun OptionallyWithUser.ifPrimaryInviteLink(block: (PrimaryInviteLink) -> T): T? =
primaryInviteLinkOrNull() ?.let(block)
public inline fun OptionallyWithUser.chatInviteLinkWithJoinRequestOrNull():
ChatInviteLinkWithJoinRequest? = this as? dev.inmo.tgbotapi.types.ChatInviteLinkWithJoinRequest
public inline fun OptionallyWithUser.chatInviteLinkWithJoinRequestOrThrow():
ChatInviteLinkWithJoinRequest = this as dev.inmo.tgbotapi.types.ChatInviteLinkWithJoinRequest
public inline fun
OptionallyWithUser.ifChatInviteLinkWithJoinRequest(block: (ChatInviteLinkWithJoinRequest) -> T):
T? = chatInviteLinkWithJoinRequestOrNull() ?.let(block)
public inline fun OptionallyWithUser.chatInviteLinkWithLimitedMembersOrNull():
ChatInviteLinkWithLimitedMembers? = this as?
dev.inmo.tgbotapi.types.ChatInviteLinkWithLimitedMembers
public inline fun OptionallyWithUser.chatInviteLinkWithLimitedMembersOrThrow():
ChatInviteLinkWithLimitedMembers = this as
dev.inmo.tgbotapi.types.ChatInviteLinkWithLimitedMembers
public inline fun
OptionallyWithUser.ifChatInviteLinkWithLimitedMembers(block: (ChatInviteLinkWithLimitedMembers) -> T):
T? = chatInviteLinkWithLimitedMembersOrNull() ?.let(block)
public inline fun OptionallyWithUser.chatInviteLinkUnlimitedOrNull(): ChatInviteLinkUnlimited? =
this as? dev.inmo.tgbotapi.types.ChatInviteLinkUnlimited
public inline fun OptionallyWithUser.chatInviteLinkUnlimitedOrThrow(): ChatInviteLinkUnlimited =
this as dev.inmo.tgbotapi.types.ChatInviteLinkUnlimited
public inline fun
OptionallyWithUser.ifChatInviteLinkUnlimited(block: (ChatInviteLinkUnlimited) -> T): T? =
chatInviteLinkUnlimitedOrNull() ?.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.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.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.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.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.chatMemberUpdatedOrNull(): ChatMemberUpdated? = this as?
dev.inmo.tgbotapi.types.chat.member.ChatMemberUpdated
public inline fun OptionallyWithUser.chatMemberUpdatedOrThrow(): ChatMemberUpdated = this as
dev.inmo.tgbotapi.types.chat.member.ChatMemberUpdated
public inline fun OptionallyWithUser.ifChatMemberUpdated(block: (ChatMemberUpdated) -> T): T? =
chatMemberUpdatedOrNull() ?.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.leftChatMemberOrNull(): LeftChatMember? = this as?
dev.inmo.tgbotapi.types.chat.member.LeftChatMember
public inline fun OptionallyWithUser.leftChatMemberOrThrow(): LeftChatMember = this as
dev.inmo.tgbotapi.types.chat.member.LeftChatMember
public inline fun OptionallyWithUser.ifLeftChatMember(block: (LeftChatMember) -> T): T? =
leftChatMemberOrNull() ?.let(block)
public inline fun OptionallyWithUser.memberChatMemberOrNull(): MemberChatMember? = this as?
dev.inmo.tgbotapi.types.chat.member.MemberChatMember
public inline fun OptionallyWithUser.memberChatMemberOrThrow(): MemberChatMember = this as
dev.inmo.tgbotapi.types.chat.member.MemberChatMember
public inline fun OptionallyWithUser.ifMemberChatMember(block: (MemberChatMember) -> T): T? =
memberChatMemberOrNull() ?.let(block)
public inline fun OptionallyWithUser.ownerChatMemberOrNull(): OwnerChatMember? = this as?
dev.inmo.tgbotapi.types.chat.member.OwnerChatMember
public inline fun OptionallyWithUser.ownerChatMemberOrThrow(): OwnerChatMember = this as
dev.inmo.tgbotapi.types.chat.member.OwnerChatMember
public inline fun OptionallyWithUser.ifOwnerChatMember(block: (OwnerChatMember) -> T): T? =
ownerChatMemberOrNull() ?.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.restrictedMemberChatMemberOrNull(): RestrictedMemberChatMember?
= this as? dev.inmo.tgbotapi.types.chat.member.RestrictedMemberChatMember
public inline fun OptionallyWithUser.restrictedMemberChatMemberOrThrow(): RestrictedMemberChatMember
= this as dev.inmo.tgbotapi.types.chat.member.RestrictedMemberChatMember
public inline fun
OptionallyWithUser.ifRestrictedMemberChatMember(block: (RestrictedMemberChatMember) -> T): T? =
restrictedMemberChatMemberOrNull() ?.let(block)
public inline fun OptionallyWithUser.specialRightsChatMemberOrNull(): SpecialRightsChatMember? =
this as? dev.inmo.tgbotapi.types.chat.member.SpecialRightsChatMember
public inline fun OptionallyWithUser.specialRightsChatMemberOrThrow(): SpecialRightsChatMember =
this as dev.inmo.tgbotapi.types.chat.member.SpecialRightsChatMember
public inline fun
OptionallyWithUser.ifSpecialRightsChatMember(block: (SpecialRightsChatMember) -> T): T? =
specialRightsChatMemberOrNull() ?.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.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.commonGroupEventMessageOrNull():
CommonGroupEventMessage? = this as?
dev.inmo.tgbotapi.types.message.CommonGroupEventMessage
public inline fun OptionallyWithUser.commonGroupEventMessageOrThrow():
CommonGroupEventMessage = this as
dev.inmo.tgbotapi.types.message.CommonGroupEventMessage
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.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.businessContentMessageOrNull():
BusinessContentMessage? = this as?
dev.inmo.tgbotapi.types.message.abstracts.BusinessContentMessage
public inline fun OptionallyWithUser.businessContentMessageOrThrow():
BusinessContentMessage = this as
dev.inmo.tgbotapi.types.message.abstracts.BusinessContentMessage
public inline fun
OptionallyWithUser.ifBusinessContentMessage(block: (BusinessContentMessage) -> T):
T? = businessContentMessageOrNull() ?.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.optionallyFromUserMessageOrNull(): OptionallyFromUserMessage? =
this as? dev.inmo.tgbotapi.types.message.abstracts.OptionallyFromUserMessage
public inline fun OptionallyWithUser.optionallyFromUserMessageOrThrow(): OptionallyFromUserMessage =
this as dev.inmo.tgbotapi.types.message.abstracts.OptionallyFromUserMessage
public inline fun
OptionallyWithUser.ifOptionallyFromUserMessage(block: (OptionallyFromUserMessage) -> T): T? =
optionallyFromUserMessageOrNull() ?.let(block)
public inline fun OptionallyWithUser.fromUserMessageOrNull(): FromUserMessage? = this as?
dev.inmo.tgbotapi.types.message.abstracts.FromUserMessage
public inline fun OptionallyWithUser.fromUserMessageOrThrow(): FromUserMessage = this as
dev.inmo.tgbotapi.types.message.abstracts.FromUserMessage
public inline fun OptionallyWithUser.ifFromUserMessage(block: (FromUserMessage) -> T): T? =
fromUserMessageOrNull() ?.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.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
public inline fun
OptionallyWithUser.ifCommonGroupContentMessage(block: (CommonGroupContentMessage) -> T):
T? = commonGroupContentMessageOrNull() ?.let(block)
public inline fun OptionallyWithUser.commonForumContentMessageOrNull():
CommonForumContentMessage? = this as?
dev.inmo.tgbotapi.types.message.abstracts.CommonForumContentMessage
public inline fun OptionallyWithUser.commonForumContentMessageOrThrow():
CommonForumContentMessage = this as
dev.inmo.tgbotapi.types.message.abstracts.CommonForumContentMessage
public inline fun
OptionallyWithUser.ifCommonForumContentMessage(block: (CommonForumContentMessage) -> T):
T? = commonForumContentMessageOrNull() ?.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.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.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.preCheckoutQueryOrNull(): PreCheckoutQuery? = this as?
dev.inmo.tgbotapi.types.payments.PreCheckoutQuery
public inline fun OptionallyWithUser.preCheckoutQueryOrThrow(): PreCheckoutQuery = this as
dev.inmo.tgbotapi.types.payments.PreCheckoutQuery
public inline fun OptionallyWithUser.ifPreCheckoutQuery(block: (PreCheckoutQuery) -> T): T? =
preCheckoutQueryOrNull() ?.let(block)
public inline fun OptionallyWithUser.shippingQueryOrNull(): ShippingQuery? = this as?
dev.inmo.tgbotapi.types.payments.ShippingQuery
public inline fun OptionallyWithUser.shippingQueryOrThrow(): ShippingQuery = this as
dev.inmo.tgbotapi.types.payments.ShippingQuery
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.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.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.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.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.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.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.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.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.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.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.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.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 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 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 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
public inline fun InputSticker.ifMask(block: (InputSticker.Mask) -> T): T? = maskOrNull()
?.let(block)
public inline fun InputSticker.withKeywordsOrNull(): InputSticker.WithKeywords? = this as?
dev.inmo.tgbotapi.requests.stickers.InputSticker.WithKeywords
public inline fun InputSticker.withKeywordsOrThrow(): InputSticker.WithKeywords = this as
dev.inmo.tgbotapi.requests.stickers.InputSticker.WithKeywords
public inline fun InputSticker.ifWithKeywords(block: (InputSticker.WithKeywords) -> T): T? =
withKeywordsOrNull() ?.let(block)
public inline fun InputSticker.customEmojiOrNull(): InputSticker.WithKeywords.CustomEmoji? = this
as? dev.inmo.tgbotapi.requests.stickers.InputSticker.WithKeywords.CustomEmoji
public inline fun InputSticker.customEmojiOrThrow(): InputSticker.WithKeywords.CustomEmoji = this as
dev.inmo.tgbotapi.requests.stickers.InputSticker.WithKeywords.CustomEmoji
public inline fun
InputSticker.ifCustomEmoji(block: (InputSticker.WithKeywords.CustomEmoji) -> T): T? =
customEmojiOrNull() ?.let(block)
public inline fun InputSticker.regularOrNull(): InputSticker.WithKeywords.Regular? = this as?
dev.inmo.tgbotapi.requests.stickers.InputSticker.WithKeywords.Regular
public inline fun InputSticker.regularOrThrow(): InputSticker.WithKeywords.Regular = this as
dev.inmo.tgbotapi.requests.stickers.InputSticker.WithKeywords.Regular
public inline fun InputSticker.ifRegular(block: (InputSticker.WithKeywords.Regular) -> T): T? =
regularOrNull() ?.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.gradientOrNull(): BackgroundFill.Gradient? = this as?
dev.inmo.tgbotapi.types.BackgroundFill.Gradient
public inline fun BackgroundFill.gradientOrThrow(): BackgroundFill.Gradient = this as
dev.inmo.tgbotapi.types.BackgroundFill.Gradient
public inline fun BackgroundFill.ifGradient(block: (BackgroundFill.Gradient) -> T): T? =
gradientOrNull() ?.let(block)
public inline fun BackgroundFill.solidOrNull(): BackgroundFill.Solid? = this as?
dev.inmo.tgbotapi.types.BackgroundFill.Solid
public inline fun BackgroundFill.solidOrThrow(): BackgroundFill.Solid = this as
dev.inmo.tgbotapi.types.BackgroundFill.Solid
public inline fun BackgroundFill.ifSolid(block: (BackgroundFill.Solid) -> T): T? = solidOrNull()
?.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 BackgroundType.chatThemeOrNull(): BackgroundType.ChatTheme? = this as?
dev.inmo.tgbotapi.types.BackgroundType.ChatTheme
public inline fun BackgroundType.chatThemeOrThrow(): BackgroundType.ChatTheme = this as
dev.inmo.tgbotapi.types.BackgroundType.ChatTheme
public inline fun BackgroundType.ifChatTheme(block: (BackgroundType.ChatTheme) -> T): T? =
chatThemeOrNull() ?.let(block)
public inline fun BackgroundType.dimmableOrNull(): BackgroundType.Dimmable? = this as?
dev.inmo.tgbotapi.types.BackgroundType.Dimmable
public inline fun BackgroundType.dimmableOrThrow(): BackgroundType.Dimmable = this as
dev.inmo.tgbotapi.types.BackgroundType.Dimmable
public inline fun BackgroundType.ifDimmable(block: (BackgroundType.Dimmable) -> T): T? =
dimmableOrNull() ?.let(block)
public inline fun BackgroundType.fillOrNull(): BackgroundType.Fill? = this as?
dev.inmo.tgbotapi.types.BackgroundType.Fill
public inline fun BackgroundType.fillOrThrow(): BackgroundType.Fill = this as
dev.inmo.tgbotapi.types.BackgroundType.Fill
public inline fun BackgroundType.ifFill(block: (BackgroundType.Fill) -> T): T? = fillOrNull()
?.let(block)
public inline fun BackgroundType.wallpaperOrNull(): BackgroundType.Wallpaper? = this as?
dev.inmo.tgbotapi.types.BackgroundType.Wallpaper
public inline fun BackgroundType.wallpaperOrThrow(): BackgroundType.Wallpaper = this as
dev.inmo.tgbotapi.types.BackgroundType.Wallpaper
public inline fun BackgroundType.ifWallpaper(block: (BackgroundType.Wallpaper) -> T): T? =
wallpaperOrNull() ?.let(block)
public inline fun BackgroundType.fillableOrNull(): BackgroundType.Fillable? = this as?
dev.inmo.tgbotapi.types.BackgroundType.Fillable
public inline fun BackgroundType.fillableOrThrow(): BackgroundType.Fillable = this as
dev.inmo.tgbotapi.types.BackgroundType.Fillable
public inline fun BackgroundType.ifFillable(block: (BackgroundType.Fillable) -> T): T? =
fillableOrNull() ?.let(block)
public inline fun BackgroundType.patternOrNull(): BackgroundType.Pattern? = this as?
dev.inmo.tgbotapi.types.BackgroundType.Pattern
public inline fun BackgroundType.patternOrThrow(): BackgroundType.Pattern = this as
dev.inmo.tgbotapi.types.BackgroundType.Pattern
public inline fun BackgroundType.ifPattern(block: (BackgroundType.Pattern) -> T): T? =
patternOrNull() ?.let(block)
public inline fun BackgroundType.movableOrNull(): BackgroundType.Movable? = this as?
dev.inmo.tgbotapi.types.BackgroundType.Movable
public inline fun BackgroundType.movableOrThrow(): BackgroundType.Movable = this as
dev.inmo.tgbotapi.types.BackgroundType.Movable
public inline fun BackgroundType.ifMovable(block: (BackgroundType.Movable) -> T): T? =
movableOrNull() ?.let(block)
public inline fun BackgroundType.unknownOrNull(): BackgroundType.Unknown? = this as?
dev.inmo.tgbotapi.types.BackgroundType.Unknown
public inline fun BackgroundType.unknownOrThrow(): BackgroundType.Unknown = this as
dev.inmo.tgbotapi.types.BackgroundType.Unknown
public inline fun BackgroundType.ifUnknown(block: (BackgroundType.Unknown) -> T): T? =
unknownOrNull() ?.let(block)
public inline fun BackgroundType.withDocumentOrNull(): BackgroundType.WithDocument? = this as?
dev.inmo.tgbotapi.types.BackgroundType.WithDocument
public inline fun BackgroundType.withDocumentOrThrow(): BackgroundType.WithDocument = this as
dev.inmo.tgbotapi.types.BackgroundType.WithDocument
public inline fun BackgroundType.ifWithDocument(block: (BackgroundType.WithDocument) -> T): T? =
withDocumentOrNull() ?.let(block)
public inline fun ChatIdentifier.idChatIdentifierOrNull(): IdChatIdentifier? = this as?
dev.inmo.tgbotapi.types.IdChatIdentifier
public inline fun ChatIdentifier.idChatIdentifierOrThrow(): IdChatIdentifier = this as
dev.inmo.tgbotapi.types.IdChatIdentifier
public inline fun ChatIdentifier.ifIdChatIdentifier(block: (IdChatIdentifier) -> T): T? =
idChatIdentifierOrNull() ?.let(block)
public inline fun ChatIdentifier.chatIdOrNull(): ChatId? = this as? dev.inmo.tgbotapi.types.ChatId
public inline fun ChatIdentifier.chatIdOrThrow(): ChatId = this as dev.inmo.tgbotapi.types.ChatId
public inline fun ChatIdentifier.ifChatId(block: (ChatId) -> T): T? = chatIdOrNull()
?.let(block)
public inline fun ChatIdentifier.chatIdWithThreadIdOrNull(): ChatIdWithThreadId? = this as?
dev.inmo.tgbotapi.types.ChatIdWithThreadId
public inline fun ChatIdentifier.chatIdWithThreadIdOrThrow(): ChatIdWithThreadId = this as
dev.inmo.tgbotapi.types.ChatIdWithThreadId
public inline fun ChatIdentifier.ifChatIdWithThreadId(block: (ChatIdWithThreadId) -> T): T? =
chatIdWithThreadIdOrNull() ?.let(block)
public inline fun ChatIdentifier.businessChatIdOrNull(): BusinessChatId? = this as?
dev.inmo.tgbotapi.types.BusinessChatId
public inline fun ChatIdentifier.businessChatIdOrThrow(): BusinessChatId = this as
dev.inmo.tgbotapi.types.BusinessChatId
public inline fun ChatIdentifier.ifBusinessChatId(block: (BusinessChatId) -> T): T? =
businessChatIdOrNull() ?.let(block)
public inline fun ChatIdentifier.usernameOrNull(): Username? = this as?
dev.inmo.tgbotapi.types.Username
public inline fun ChatIdentifier.usernameOrThrow(): Username = this as
dev.inmo.tgbotapi.types.Username
public inline fun ChatIdentifier.ifUsername(block: (Username) -> T): T? = usernameOrNull()
?.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 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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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 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.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.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 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.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 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.contentOrNull(): ReplyInfo.External.Content? = this as?
dev.inmo.tgbotapi.types.ReplyInfo.External.Content
public inline fun ReplyInfo.contentOrThrow(): ReplyInfo.External.Content = this as
dev.inmo.tgbotapi.types.ReplyInfo.External.Content
public inline fun ReplyInfo.ifContent(block: (ReplyInfo.External.Content) -> T): T? =
contentOrNull() ?.let(block)
public inline fun ReplyInfo.mediaOrNull(): ReplyInfo.External.Content.Media? = this as?
dev.inmo.tgbotapi.types.ReplyInfo.External.Content.Media
public inline fun ReplyInfo.mediaOrThrow(): ReplyInfo.External.Content.Media = this as
dev.inmo.tgbotapi.types.ReplyInfo.External.Content.Media
public inline fun ReplyInfo.ifMedia(block: (ReplyInfo.External.Content.Media) -> T): T? =
mediaOrNull() ?.let(block)
public inline fun ReplyInfo.simpleOrNull(): ReplyInfo.External.Content.Simple? = this as?
dev.inmo.tgbotapi.types.ReplyInfo.External.Content.Simple
public inline fun ReplyInfo.simpleOrThrow(): ReplyInfo.External.Content.Simple = this as
dev.inmo.tgbotapi.types.ReplyInfo.External.Content.Simple
public inline fun ReplyInfo.ifSimple(block: (ReplyInfo.External.Content.Simple) -> T): T? =
simpleOrNull() ?.let(block)
public inline fun ReplyInfo.textOrNull(): ReplyInfo.External.Text? = this as?
dev.inmo.tgbotapi.types.ReplyInfo.External.Text
public inline fun ReplyInfo.textOrThrow(): ReplyInfo.External.Text = this as
dev.inmo.tgbotapi.types.ReplyInfo.External.Text
public inline fun ReplyInfo.ifText(block: (ReplyInfo.External.Text) -> T): T? = textOrNull()
?.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 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 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.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.claimedOrNull(): ChatBoostSource.Giveaway.Claimed? = this as?
dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Claimed
public inline fun ChatBoostSource.claimedOrThrow(): ChatBoostSource.Giveaway.Claimed = this as
dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Claimed
public inline fun ChatBoostSource.ifClaimed(block: (ChatBoostSource.Giveaway.Claimed) -> T): T?
= claimedOrNull() ?.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.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.createdOrNull(): ChatBoostSource.Giveaway.Created? = this as?
dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Created
public inline fun ChatBoostSource.createdOrThrow(): ChatBoostSource.Giveaway.Created = this as
dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Created
public inline fun ChatBoostSource.ifCreated(block: (ChatBoostSource.Giveaway.Created) -> T): T?
= createdOrNull() ?.let(block)
public inline fun ChatBoostSource.unclaimedOrNull(): ChatBoostSource.Giveaway.Unclaimed? = this as?
dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Unclaimed
public inline fun ChatBoostSource.unclaimedOrThrow(): ChatBoostSource.Giveaway.Unclaimed = this as
dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Unclaimed
public inline fun ChatBoostSource.ifUnclaimed(block: (ChatBoostSource.Giveaway.Unclaimed) -> T):
T? = unclaimedOrNull() ?.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 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 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 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.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.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 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 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.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 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 Chat.usernameChatOrNull(): UsernameChat? = this as?
dev.inmo.tgbotapi.types.chat.UsernameChat
public inline fun Chat.usernameChatOrThrow(): UsernameChat = this as
dev.inmo.tgbotapi.types.chat.UsernameChat
public inline fun Chat.ifUsernameChat(block: (UsernameChat) -> T): T? = usernameChatOrNull()
?.let(block)
public inline fun Chat.privateChatOrNull(): PrivateChat? = this as?
dev.inmo.tgbotapi.types.chat.PrivateChat
public inline fun Chat.privateChatOrThrow(): PrivateChat = this as
dev.inmo.tgbotapi.types.chat.PrivateChat
public inline fun Chat.ifPrivateChat(block: (PrivateChat) -> T): T? = privateChatOrNull()
?.let(block)
public inline fun Chat.businessChatOrNull(): BusinessChat? = this as?
dev.inmo.tgbotapi.types.chat.BusinessChat
public inline fun Chat.businessChatOrThrow(): BusinessChat = this as
dev.inmo.tgbotapi.types.chat.BusinessChat
public inline fun Chat.ifBusinessChat(block: (BusinessChat) -> T): T? = businessChatOrNull()
?.let(block)
public inline fun Chat.publicChatOrNull(): PublicChat? = this as?
dev.inmo.tgbotapi.types.chat.PublicChat
public inline fun Chat.publicChatOrThrow(): PublicChat = this as
dev.inmo.tgbotapi.types.chat.PublicChat
public inline fun Chat.ifPublicChat(block: (PublicChat) -> T): T? = publicChatOrNull()
?.let(block)
public inline fun Chat.superPublicChatOrNull(): SuperPublicChat? = this as?
dev.inmo.tgbotapi.types.chat.SuperPublicChat
public inline fun Chat.superPublicChatOrThrow(): SuperPublicChat = this as
dev.inmo.tgbotapi.types.chat.SuperPublicChat
public inline fun Chat.ifSuperPublicChat(block: (SuperPublicChat) -> T): T? =
superPublicChatOrNull() ?.let(block)
public inline fun Chat.channelChatOrNull(): ChannelChat? = this as?
dev.inmo.tgbotapi.types.chat.ChannelChat
public inline fun Chat.channelChatOrThrow(): ChannelChat = this as
dev.inmo.tgbotapi.types.chat.ChannelChat
public inline fun Chat.ifChannelChat(block: (ChannelChat) -> T): T? = channelChatOrNull()
?.let(block)
public inline fun Chat.groupChatOrNull(): GroupChat? = this as?
dev.inmo.tgbotapi.types.chat.GroupChat
public inline fun Chat.groupChatOrThrow(): GroupChat = this as
dev.inmo.tgbotapi.types.chat.GroupChat
public inline fun Chat.ifGroupChat(block: (GroupChat) -> T): T? = groupChatOrNull() ?.let(block)
public inline fun Chat.supergroupChatOrNull(): SupergroupChat? = this as?
dev.inmo.tgbotapi.types.chat.SupergroupChat
public inline fun Chat.supergroupChatOrThrow(): SupergroupChat = this as
dev.inmo.tgbotapi.types.chat.SupergroupChat
public inline fun Chat.ifSupergroupChat(block: (SupergroupChat) -> T): T? =
supergroupChatOrNull() ?.let(block)
public inline fun Chat.forumChatOrNull(): ForumChat? = this as?
dev.inmo.tgbotapi.types.chat.ForumChat
public inline fun Chat.forumChatOrThrow(): ForumChat = this as
dev.inmo.tgbotapi.types.chat.ForumChat
public inline fun Chat.ifForumChat(block: (ForumChat) -> T): T? = forumChatOrNull() ?.let(block)
public inline fun Chat.possiblyPremiumChatOrNull(): PossiblyPremiumChat? = this as?
dev.inmo.tgbotapi.types.chat.PossiblyPremiumChat
public inline fun Chat.possiblyPremiumChatOrThrow(): PossiblyPremiumChat = this as
dev.inmo.tgbotapi.types.chat.PossiblyPremiumChat
public inline fun Chat.ifPossiblyPremiumChat(block: (PossiblyPremiumChat) -> T): T? =
possiblyPremiumChatOrNull() ?.let(block)
public inline fun Chat.ableToAddInAttachmentMenuChatOrNull(): AbleToAddInAttachmentMenuChat? = this
as? dev.inmo.tgbotapi.types.chat.AbleToAddInAttachmentMenuChat
public inline fun Chat.ableToAddInAttachmentMenuChatOrThrow(): AbleToAddInAttachmentMenuChat = this
as dev.inmo.tgbotapi.types.chat.AbleToAddInAttachmentMenuChat
public inline fun
Chat.ifAbleToAddInAttachmentMenuChat(block: (AbleToAddInAttachmentMenuChat) -> T): T? =
ableToAddInAttachmentMenuChatOrNull() ?.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.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.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.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.userOrNull(): User? = this as? dev.inmo.tgbotapi.types.chat.User
public inline fun Chat.userOrThrow(): User = this as dev.inmo.tgbotapi.types.chat.User
public inline fun Chat.ifUser(block: (User) -> T): T? = userOrNull() ?.let(block)
public inline fun Chat.previewUserOrNull(): PreviewUser? = this as?
dev.inmo.tgbotapi.types.chat.PreviewUser
public inline fun Chat.previewUserOrThrow(): PreviewUser = this as
dev.inmo.tgbotapi.types.chat.PreviewUser
public inline fun Chat.ifPreviewUser(block: (PreviewUser) -> T): T? = previewUserOrNull()
?.let(block)
public inline fun Chat.botOrNull(): Bot? = this as? dev.inmo.tgbotapi.types.chat.Bot
public inline fun Chat.botOrThrow(): Bot = this as dev.inmo.tgbotapi.types.chat.Bot
public inline fun Chat.ifBot(block: (Bot) -> T): T? = botOrNull() ?.let(block)
public inline fun Chat.previewBotOrNull(): PreviewBot? = this as?
dev.inmo.tgbotapi.types.chat.PreviewBot
public inline fun Chat.previewBotOrThrow(): PreviewBot = this as
dev.inmo.tgbotapi.types.chat.PreviewBot
public inline fun Chat.ifPreviewBot(block: (PreviewBot) -> T): T? = previewBotOrNull()
?.let(block)
public inline fun Chat.commonBotOrNull(): CommonBot? = this as?
dev.inmo.tgbotapi.types.chat.CommonBot
public inline fun Chat.commonBotOrThrow(): CommonBot = this as
dev.inmo.tgbotapi.types.chat.CommonBot
public inline fun Chat.ifCommonBot(block: (CommonBot) -> T): T? = commonBotOrNull() ?.let(block)
public inline fun Chat.commonUserOrNull(): CommonUser? = this as?
dev.inmo.tgbotapi.types.chat.CommonUser
public inline fun Chat.commonUserOrThrow(): CommonUser = this as
dev.inmo.tgbotapi.types.chat.CommonUser
public inline fun Chat.ifCommonUser(block: (CommonUser) -> T): T? = commonUserOrNull()
?.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