Package-level declarations

Properties

Link copied to clipboard

Functions

Link copied to clipboard
suspend fun PathedFile.download(telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper, client: HttpClient = HttpClient()): ByteArray
Link copied to clipboard
inline fun <T : WithChat> Flow<T>.fromChat(chatId: ChatIdentifier): Flow<T>

Will pass only those T which have sameChat as chatId

inline fun <T : WithChat> Flow<T>.fromChat(chat: Chat): Flow<T>

Will pass only those T which have sameChat as chatId

Link copied to clipboard
inline fun <T : FromUser> Flow<T>.fromUser(userId: UserId): Flow<T>
inline fun <T : FromUser> Flow<T>.fromUser(user: User): Flow<T>
Link copied to clipboard
suspend fun HttpClient.loadFile(telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper, pathedFile: PathedFile): ByteArray
suspend fun HttpClient.loadFile(telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper, filePath: String): ByteArray
Link copied to clipboard
fun TextedWithTextSources.parseCommandsWithParams(argsSeparator: Regex = defaultArgsSeparator): Map<String, Array<String>>
fun ContentMessage<TextContent>.parseCommandsWithParams(argsSeparator: Regex = defaultArgsSeparator): Map<String, Array<String>>
fun List<TextSource>.parseCommandsWithParams(argsSeparator: Regex = defaultArgsSeparator): MutableMap<String, Array<String>>

Parse commands and their args. Logic will find command, get all subsequent data as args until new command

Link copied to clipboard
inline fun WithChat.sameChat(chat: Chat): Boolean
inline fun WithChat.sameChat(other: Message): Boolean
Link copied to clipboard
inline fun Message.sameMessage(other: Message): Boolean
inline fun Message.sameMessage(chatId: ChatIdentifier, messageId: MessageId): Boolean
inline fun Message.sameMessage(chat: Chat, messageId: MessageId): Boolean
Link copied to clipboard
inline fun Message.sameThread(other: Message): Boolean
inline fun Message.sameThread(chatId: ChatIdentifier, threadId: MessageThreadId? = chatId.threadId): Boolean
inline fun Message.sameThread(chat: Chat, threadId: MessageThreadId? = chat.id.threadId): Boolean

Thread is the same thing that topic

Link copied to clipboard
inline fun Message.sameTopic(other: Message): Boolean
inline fun Message.sameTopic(chatId: ChatIdentifier, threadId: MessageThreadId? = chatId.threadId): Boolean
inline fun Message.sameTopic(chat: Chat, threadId: MessageThreadId? = chat.id.threadId): Boolean

Thread is the same thing that topic

Link copied to clipboard
Link copied to clipboard
fun Update.sourceChatWithConverters(baseMessageUpdateConverter: (BaseMessageUpdate) -> Chat? = { it.data.chat }, chatJoinRequestUpdateConverter: (ChatJoinRequestUpdate) -> Chat? = { it.data.chat }, shippingQueryUpdateConverter: (ShippingQueryUpdate) -> Chat? = { null }, pollAnswerUpdateConverter: (PollAnswerUpdate) -> Chat? = { null }, preCheckoutQueryUpdateConverter: (PreCheckoutQueryUpdate) -> Chat? = { it.data.from }, callbackQueryUpdateConverter: (CallbackQueryUpdate) -> Chat? = { it.data.sourceChat() }, chosenInlineResultUpdateConverter: (ChosenInlineResultUpdate) -> Chat? = { null }, inlineQueryUpdateConverter: (InlineQueryUpdate) -> Chat? = { null }, pollUpdateConverter: (PollUpdate) -> Chat? = { null }, channelPostUpdateConverter: (ChannelPostUpdate) -> Chat? = { it.data.chat }, messageUpdateConverter: (MessageUpdate) -> Chat? = { it.data.chat }, editChannelPostUpdateConverter: (EditChannelPostUpdate) -> Chat? = { it.data.chat }, editMessageUpdateConverter: (EditMessageUpdate) -> Chat? = { it.data.chat }, myChatMemberUpdatedUpdateConverter: (MyChatMemberUpdatedUpdate) -> Chat? = { it.data.chat }, commonChatMemberUpdatedUpdateConverter: (CommonChatMemberUpdatedUpdate) -> Chat? = { it.data.chat }): Chat?
Link copied to clipboard