Package-level declarations

Types

Link copied to clipboard
@Serializable
data class SlotMachineResult(val rawValue: DiceResult)

Functions

Link copied to clipboard
fun <T> aggregateFlows(withScope: CoroutineScope, vararg flows: Flow<T>, internalBufferSize: Int = 64): Flow<T>

Analog of merge function for Flows. The difference is in the usage of BroadcastChannel in this case

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun Chat.asBot(): Bot?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun Chat.asCommonBot(): CommonBot?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun Any.asFromUser(): FromUser?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun Chat.asGroupChat(): GroupChat?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun Poll.asQuizPoll(): QuizPoll?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun Chat.asUser(): User?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun Any.asWithUser(): WithUser?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <C : MessageContent, T : ContentMessage<C>> Flow<T>.commonMessages(): Flow<CommonMessage<C>>

Shortcut for onlyCommonMessages

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <T, R> Flow<T>.flatMap(mapper: suspend (T) -> Iterable<R>): Flow<R>
Link copied to clipboard
fun <T> Flow<Iterable<T>>.flatten(): Flow<T>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> TelegramMediaFile.ifAnimationFile(block: (AnimationFile) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> ResendableContent.ifAudioContent(block: (AudioContent) -> T): T?
Link copied to clipboard
inline fun <T> TelegramMediaFile.ifAudioFile(block: (AudioFile) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> WithUser.ifBannedChatMember(block: (BannedChatMember) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> WithUser.ifBaseInlineQuery(block: (BaseInlineQuery) -> T): T?
Link copied to clipboard
inline fun <T> Update.ifBaseMessageUpdate(block: (BaseMessageUpdate) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> TextSource.ifBoldTextSource(block: (BoldTextSource) -> T): T?
Link copied to clipboard
inline fun <T> Chat.ifBot(block: (Bot) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> ForwardInfo.ifByUser(block: (ForwardInfo.ByUser) -> T): T?
Link copied to clipboard
inline fun <T> WithUser.ifCallbackQuery(block: (CallbackQuery) -> T): T?
Link copied to clipboard
inline fun <T> Update.ifCallbackQueryUpdate(block: (CallbackQueryUpdate) -> T): T?
Link copied to clipboard
inline fun <T> TextSource.ifCashTagTextSource(block: (CashTagTextSource) -> T): T?
Link copied to clipboard
inline fun <T> Chat.ifChannelChat(block: (ChannelChat) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.ifChannelChatImpl(block: (ChannelChatImpl) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> ChatEvent.ifChannelEvent(block: (ChannelEvent) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> Update.ifChannelPostUpdate(block: (ChannelPostUpdate) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> ChatIdentifier.ifChatId(block: (ChatId) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> WithUser.ifChatInviteLink(block: (ChatInviteLink) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> WithUser.ifChatJoinRequest(block: (ChatJoinRequest) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> WithUser.ifChatMember(block: (ChatMember) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> ChatEvent.ifChatShared(block: (ChatShared) -> T): T?
inline fun <T> RequestResponse.ifChatShared(block: (ChatShared) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> WithUser.ifChosenInlineResult(block: (ChosenInlineResult) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> TextSource.ifCodeTextSource(block: (CodeTextSource) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.ifCommonBot(block: (CommonBot) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.ifCommonEvent(block: (CommonEvent) -> T): T?
Link copied to clipboard
inline fun <T> Message.ifCommonMessage(block: (CommonMessage<MessageContent>) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.ifCommonUser(block: (CommonUser) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> BotAction.ifCustomBotAction(block: (CustomBotAction) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> WithUser.ifDataCallbackQuery(block: (DataCallbackQuery) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.ifDeleteChatPhoto(block: (DeleteChatPhoto) -> T): T?
Link copied to clipboard
inline fun <T> ResendableContent.ifDiceContent(block: (DiceContent) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> TelegramMediaFile.ifDocumentFile(block: (DocumentFile) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Update.ifEditMessageUpdate(block: (EditMessageUpdate) -> T): T?
Link copied to clipboard
inline fun <T> EncryptedPassportElement.ifEmail(block: (Email) -> T): T?
Link copied to clipboard
inline fun <T> TextSource.ifEMailTextSource(block: (EMailTextSource) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.ifExtendedBot(block: (ExtendedBot) -> T): T?
Link copied to clipboard
inline fun <T> Chat.ifExtendedChannelChat(block: (ExtendedChannelChat) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.ifExtendedChat(block: (ExtendedChat) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.ifExtendedForumChat(block: (ExtendedForumChat) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.ifExtendedGroupChat(block: (ExtendedGroupChat) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.ifExtendedPrivateChat(block: (ExtendedPrivateChat) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.ifExtendedPublicChat(block: (ExtendedPublicChat) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> TelegramMediaFile.ifFile(block: (File) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.ifForumChat(block: (ForumChat) -> T): T?
Link copied to clipboard
inline fun <T> Chat.ifForumChatImpl(block: (ForumChatImpl) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> ChatEvent.ifForumEvent(block: (ForumEvent) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.ifForumTopicClosed(block: (ForumTopicClosed) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.ifForumTopicCreated(block: (ForumTopicCreated) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.ifForumTopicEdited(block: (ForumTopicEdited) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> WithUser.ifFromUser(block: (FromUser) -> T): T?
inline fun <T> Any.ifFromUser(block: (FromUser) -> T): T?
Link copied to clipboard
inline fun <T> WithUser.ifFromUserMessage(block: (FromUserMessage) -> T): T?
inline fun <T> Message.ifFromUserMessage(block: (FromUserMessage) -> T): T?
Link copied to clipboard
inline fun <T> ResendableContent.ifGameContent(block: (GameContent) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.ifGroupChat(block: (GroupChat) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.ifGroupChatCreated(block: (GroupChatCreated) -> T): T?
Link copied to clipboard
inline fun <T> Chat.ifGroupChatImpl(block: (GroupChatImpl) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> ChatEvent.ifGroupEvent(block: (GroupEvent) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> TextSource.ifHashTagTextSource(block: (HashTagTextSource) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> WithUser.ifInlineQuery(block: (InlineQuery) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Update.ifInlineQueryUpdate(block: (InlineQueryUpdate) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> TextSource.ifItalicTextSource(block: (ItalicTextSource) -> T): T?
Link copied to clipboard
inline fun <T> WithUser.ifKickedChatMember(block: (KickedChatMember) -> T): T?
Link copied to clipboard
inline fun <T> WithUser.ifLeftChatMember(block: (LeftChatMember) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> WithUser.ifLeftChatMemberImpl(block: (LeftChatMemberImpl) -> T): T?
Link copied to clipboard
inline fun <T> Location.ifLiveLocation(block: (LiveLocation) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> InputSticker.ifMask(block: (InputSticker.Mask) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> TelegramMediaFile.ifMaskSticker(block: (MaskSticker) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> ResendableContent.ifMediaContent(block: (MediaContent) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> WithUser.ifMemberChatMember(block: (MemberChatMember) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> TextSource.ifMentionTextSource(block: (MentionTextSource) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Update.ifMessageUpdate(block: (MessageUpdate) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Poll.ifMultipleAnswersPoll(block: (MultipleAnswersPoll) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> ChatEvent.ifNewChatMembers(block: (NewChatMembers) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.ifNewChatPhoto(block: (NewChatPhoto) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.ifNewChatTitle(block: (NewChatTitle) -> T): T?
Link copied to clipboard
inline fun <T> WithUser.ifOwnerChatMember(block: (OwnerChatMember) -> T): T?
Link copied to clipboard
inline fun <T> EncryptedPassportElement.ifPassport(block: (Passport) -> T): T?
Link copied to clipboard
inline fun <T> TelegramMediaFile.ifPassportFile(block: (PassportFile) -> T): T?
Link copied to clipboard
inline fun <T> WithUser.ifPassportMessage(block: (PassportMessage) -> T): T?
inline fun <T> Message.ifPassportMessage(block: (PassportMessage) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> TelegramMediaFile.ifPathedFile(block: (PathedFile) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> ResendableContent.ifPhotoContent(block: (PhotoContent) -> T): T?
Link copied to clipboard
inline fun <T> TelegramMediaFile.ifPhotoSize(block: (PhotoSize) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.ifPinnedMessage(block: (PinnedMessage) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> WithUser.ifPollAnswer(block: (PollAnswer) -> T): T?
Link copied to clipboard
inline fun <T> Update.ifPollAnswerUpdate(block: (PollAnswerUpdate) -> T): T?
Link copied to clipboard
inline fun <T> ResendableContent.ifPollContent(block: (PollContent) -> T): T?
Link copied to clipboard
inline fun <T> Update.ifPollUpdate(block: (PollUpdate) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.ifPossiblyPremiumChat(block: (PossiblyPremiumChat) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> WithUser.ifPreCheckoutQuery(block: (PreCheckoutQuery) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> TextSource.ifPreTextSource(block: (PreTextSource) -> T): T?
Link copied to clipboard
inline fun <T> WithUser.ifPrimaryInviteLink(block: (PrimaryInviteLink) -> T): T?
Link copied to clipboard
inline fun <T> Chat.ifPrivateChat(block: (PrivateChat) -> T): T?
Link copied to clipboard
inline fun <T> Chat.ifPrivateChatImpl(block: (PrivateChatImpl) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.ifPrivateEvent(block: (PrivateEvent) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.ifPublicChat(block: (PublicChat) -> T): T?
inline fun <T> ForwardInfo.ifPublicChat(block: (ForwardInfo.PublicChat) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.ifPublicChatEvent(block: (PublicChatEvent) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> Poll.ifQuizPoll(block: (QuizPoll) -> T): T?
Link copied to clipboard
inline fun <T> BotAction.ifRecordVideoAction(block: (RecordVideoAction) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> BotAction.ifRecordVoiceAction(block: (RecordVoiceAction) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Poll.ifRegularPoll(block: (RegularPoll) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> TextSource.ifRegularTextSource(block: (RegularTextSource) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> KeyboardMarkup.ifReplyForce(block: (ReplyForce) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> CommonSendInvoiceData.ifSendInvoice(block: (SendInvoice) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> WithUser.ifShippingQuery(block: (ShippingQuery) -> T): T?
Link copied to clipboard
inline fun <T> Update.ifShippingQueryUpdate(block: (ShippingQueryUpdate) -> T): T?
Link copied to clipboard
inline fun <T> Message.ifSignedMessage(block: (SignedMessage) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> TextSource.ifSpoilerTextSource(block: (SpoilerTextSource) -> T): T?
Link copied to clipboard
inline fun <T> Location.ifStaticLocation(block: (StaticLocation) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> TelegramMediaFile.ifSticker(block: (Sticker) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.ifSupergroupChat(block: (SupergroupChat) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.ifSupergroupChatImpl(block: (SupergroupChatImpl) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.ifSupergroupEvent(block: (SupergroupEvent) -> T): T?
Link copied to clipboard
inline fun <T> Chat.ifSuperPublicChat(block: (SuperPublicChat) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> ResendableContent.ifTextContent(block: (TextContent) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> BotAction.ifTypingAction(block: (TypingAction) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.ifUnknownChatType(block: (UnknownChatType) -> T): T?
Link copied to clipboard
inline fun <T> Chat.ifUnknownExtendedChat(block: (UnknownExtendedChat) -> T): T?
Link copied to clipboard
inline fun <T> Message.ifUnknownMessageType(block: (UnknownMessageType) -> T): T?
Link copied to clipboard
inline fun <T> Poll.ifUnknownPollType(block: (UnknownPollType) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> Update.ifUnknownUpdate(block: (UnknownUpdate) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> BotAction.ifUploadPhotoAction(block: (UploadPhotoAction) -> T): T?
Link copied to clipboard
inline fun <T> BotAction.ifUploadVideoAction(block: (UploadVideoAction) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> BotAction.ifUploadVoiceAction(block: (UploadVoiceAction) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> TextSource.ifURLTextSource(block: (URLTextSource) -> T): T?
Link copied to clipboard
inline fun <T> Chat.ifUser(block: (User) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.ifUserLoggedIn(block: (UserLoggedIn) -> T): T?
Link copied to clipboard
inline fun <T> ChatIdentifier.ifUsername(block: (Username) -> T): T?
Link copied to clipboard
inline fun <T> Chat.ifUsernameChat(block: (UsernameChat) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.ifUserShared(block: (UserShared) -> T): T?
inline fun <T> RequestResponse.ifUserShared(block: (UserShared) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> ResendableContent.ifVenueContent(block: (VenueContent) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.ifVideoChatEnded(block: (VideoChatEnded) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.ifVideoChatEvent(block: (VideoChatEvent) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> ChatEvent.ifVideoChatStarted(block: (VideoChatStarted) -> T): T?
Link copied to clipboard
inline fun <T> ResendableContent.ifVideoContent(block: (VideoContent) -> T): T?
Link copied to clipboard
inline fun <T> TelegramMediaFile.ifVideoFile(block: (VideoFile) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> TelegramMediaFile.ifVideoNoteFile(block: (VideoNoteFile) -> T): T?
Link copied to clipboard
inline fun <T> TelegramMediaFile.ifVideoSticker(block: (VideoSticker) -> T): T?
Link copied to clipboard
inline fun <T> ResendableContent.ifVoiceContent(block: (VoiceContent) -> T): T?
Link copied to clipboard
inline fun <T> TelegramMediaFile.ifVoiceFile(block: (VoiceFile) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.ifWebAppData(block: (WebAppData) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Any.ifWithUser(block: (WithUser) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Simple factory to convert ContentMessage to a CommonMessage

Link copied to clipboard
fun <MC : MessageContent, M : ContentMessage<MC>> Flow<M>.onlySentViaBot(): Flow<Any>

Filter the messages and checking that incoming CommonMessage is PossiblySentViaBotCommonMessage and its PossiblySentViaBotCommonMessage.senderBot is not null

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun Chat.requireBot(): Bot
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun Chat.requireUser(): User
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun Chat.userOrNull(): User?
Link copied to clipboard
inline fun Chat.userOrThrow(): User
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> ResendableContent.whenAudioContent(block: (AudioContent) -> T): T?
Link copied to clipboard
inline fun <T> TelegramMediaFile.whenAudioFile(block: (AudioFile) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> ChatMember.whenBannedChatMember(block: (BannedChatMember) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> InlineQuery.whenBaseInlineQuery(block: (BaseInlineQuery) -> T): T?
Link copied to clipboard
inline fun <T> Update.whenBaseMessageUpdate(block: (BaseMessageUpdate) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> TextSource.whenBoldTextSource(block: (BoldTextSource) -> T): T?
Link copied to clipboard
inline fun <T> Chat.whenBot(block: (Bot) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.whenChannelChat(block: (ChannelChat) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> ChatEvent.whenChannelEvent(block: (ChannelEvent) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> Update.whenChannelPostUpdate(block: (ChannelPostUpdate) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> TextSource.whenCodeTextSource(block: (CodeTextSource) -> T): T?
Link copied to clipboard
inline fun <T> Chat.whenCommonBot(block: (CommonBot) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.whenCommonEvent(block: (CommonEvent) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.whenCommonUser(block: (CommonUser) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> ChatEvent.whenDeleteChatPhoto(block: (DeleteChatPhoto) -> T): T?
Link copied to clipboard
inline fun <T> ResendableContent.whenDiceContent(block: (DiceContent) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> TelegramMediaFile.whenDocumentFile(block: (DocumentFile) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Update.whenEditMessageUpdate(block: (EditMessageUpdate) -> T): T?
Link copied to clipboard
inline fun <T> EncryptedPassportElement.whenEmail(block: (Email) -> T): T?
Link copied to clipboard
inline fun <T> TextSource.whenEMailTextSource(block: (EMailTextSource) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.whenExtendedBot(block: (ExtendedBot) -> T): T?
Link copied to clipboard
inline fun <T> Chat.whenExtendedChannelChat(block: (ExtendedChannelChat) -> T): T?
Link copied to clipboard
inline fun <T> Chat.whenExtendedChat(block: (ExtendedChat) -> T): T?
Link copied to clipboard
inline fun <T> Chat.whenExtendedGroupChat(block: (ExtendedGroupChat) -> T): T?
Link copied to clipboard
inline fun <T> Chat.whenExtendedPrivateChat(block: (ExtendedPrivateChat) -> T): T?
Link copied to clipboard
inline fun <T> Chat.whenExtendedPublicChat(block: (ExtendedPublicChat) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> TelegramMediaFile.whenFile(block: (File) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> KeyboardMarkup.whenForceReply(block: (ReplyForce) -> T): T?
Link copied to clipboard
inline fun <T> Any.whenFromUser(block: (FromUser) -> T): T?
Link copied to clipboard
inline fun <T> Message.whenFromUserMessage(block: (FromUserMessage) -> T): T?
Link copied to clipboard
inline fun <T> ResendableContent.whenGameContent(block: (GameContent) -> T): T?
Link copied to clipboard
inline fun <T> Chat.whenGroupChat(block: (GroupChat) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.whenGroupChatCreated(block: (GroupChatCreated) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> ChatEvent.whenGroupEvent(block: (GroupEvent) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Update.whenInlineQueryUpdate(block: (InlineQueryUpdate) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> TextSource.whenItalicTextSource(block: (ItalicTextSource) -> T): T?
Link copied to clipboard
inline fun <T> ChatMember.whenKickedChatMember(block: (KickedChatMember) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.whenLeftChatMember(block: (LeftChatMemberEvent) -> T): T?
Link copied to clipboard
inline fun <T> Location.whenLiveLocation(block: (LiveLocation) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> ResendableContent.whenMediaContent(block: (MediaContent) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> ChatMember.whenMemberChatMember(block: (MemberChatMember) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Update.whenMessageUpdate(block: (MessageUpdate) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Poll.whenMultipleAnswersPoll(block: (MultipleAnswersPoll) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.whenNewChatMembers(block: (NewChatMembers) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.whenNewChatPhoto(block: (NewChatPhoto) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.whenNewChatTitle(block: (NewChatTitle) -> T): T?
Link copied to clipboard
inline fun <T> ChatMember.whenOwnerChatMember(block: (OwnerChatMember) -> T): T?
Link copied to clipboard
inline fun <T> EncryptedPassportElement.whenPassport(block: (Passport) -> T): T?
Link copied to clipboard
inline fun <T> Message.whenPassportMessage(block: (PassportMessage) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> TelegramMediaFile.whenPathedFile(block: (PathedFile) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> ResendableContent.whenPhotoContent(block: (PhotoContent) -> T): T?
Link copied to clipboard
inline fun <T> TelegramMediaFile.whenPhotoSize(block: (PhotoSize) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.whenPinnedMessage(block: (PinnedMessage) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> Update.whenPollAnswerUpdate(block: (PollAnswerUpdate) -> T): T?
Link copied to clipboard
inline fun <T> ResendableContent.whenPollContent(block: (PollContent) -> T): T?
Link copied to clipboard
inline fun <T> Update.whenPollUpdate(block: (PollUpdate) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.whenPossiblyPremiumChat(block: (PossiblyPremiumChat) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> TextSource.whenPreTextSource(block: (PreTextSource) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.whenPrivateChat(block: (PrivateChat) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.whenPublicChat(block: (PublicChat) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.whenPublicChatEvent(block: (PublicChatEvent) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> Poll.whenQuizPoll(block: (QuizPoll) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Poll.whenRegularPoll(block: (RegularPoll) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Message.whenSignedMessage(block: (SignedMessage) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Location.whenStaticLocation(block: (StaticLocation) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> TelegramMediaFile.whenSticker(block: (Sticker) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.whenSupergroupChat(block: (SupergroupChat) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> ChatEvent.whenSupergroupEvent(block: (SupergroupEvent) -> T): T?
Link copied to clipboard
inline fun <T> Chat.whenSuperPublicChat(block: (SuperPublicChat) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> ResendableContent.whenTextContent(block: (TextContent) -> T): T?
Link copied to clipboard
inline fun <T> MessageContent.whenTextedInput(block: (TextedInput) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> BotAction.whenTypingAction(block: (TypingAction) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> Chat.whenUnknownChatType(block: (UnknownChatType) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> Poll.whenUnknownPollType(block: (UnknownPollType) -> T): T?
Link copied to clipboard
inline fun <T> Update.whenUnknownUpdate(block: (UnknownUpdate) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> TextSource.whenURLTextSource(block: (URLTextSource) -> T): T?
Link copied to clipboard
inline fun <T> Chat.whenUser(block: (User) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> ChatEvent.whenUserLoggedIn(block: (UserLoggedIn) -> T): T?
Link copied to clipboard
inline fun <T> Chat.whenUsernameChat(block: (UsernameChat) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> ResendableContent.whenVenueContent(block: (VenueContent) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.whenVideoChatEnded(block: (VideoChatEnded) -> T): T?
Link copied to clipboard
inline fun <T> ChatEvent.whenVideoChatEvent(block: (VideoChatEvent) -> T): T?
Link copied to clipboard
Link copied to clipboard
inline fun <T> ChatEvent.whenVideoChatStarted(block: (VideoChatStarted) -> T): T?
Link copied to clipboard
inline fun <T> ResendableContent.whenVideoContent(block: (VideoContent) -> T): T?
Link copied to clipboard
inline fun <T> TelegramMediaFile.whenVideoFile(block: (VideoFile) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> TelegramMediaFile.whenVideoSticker(block: (VideoSticker) -> T): T?
Link copied to clipboard
inline fun <T> ResendableContent.whenVoiceContent(block: (VoiceContent) -> T): T?
Link copied to clipboard
inline fun <T> TelegramMediaFile.whenVoiceFile(block: (VoiceFile) -> T): T?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> Any.whenWithUser(block: (WithUser) -> T): T?
Link copied to clipboard

Filter the messages and checking that incoming ContentMessage.content is not MediaGroupContent

Link copied to clipboard

Filter the messages and checking that incoming CommonMessage not is PossiblySentViaBotCommonMessage or its PossiblySentViaBotCommonMessage.senderBot is null

Link copied to clipboard
inline fun Any.withUserOrNull(): WithUser?
Link copied to clipboard