Package dev.inmo.tgbotapi.extensions.utils.extensions

Functions

Link copied to clipboard
suspend fun PathedFile.download(telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper, client: HttpClient = HttpClient()): ByteArray
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 Message.sameChat(other: Message): Boolean
Link copied to clipboard
inline fun Message.sameMessage(other: Message): Boolean
Link copied to clipboard
fun Update.sourceChat(): Chat?
Link copied to clipboard
fun Update.sourceUser(): User?

Properties

Link copied to clipboard
val defaultArgsSeparator: Regex