1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-05-31 23:15:21 +00:00

update kdocs

This commit is contained in:
InsanusMokrassar 2023-10-25 14:55:46 +06:00
parent 080db09d2c
commit 2b938903b6

View File

@ -83,14 +83,14 @@ fun Flow<CommonMessage<TextContent>>.requireCommandsWithoutParams() = filter {
} }
/** /**
* Map the commands with their arguments and source messages * Uses [parseCommandsWithArgsSources] on incoming text sources and map them with [CommonMessage]
*/ */
fun Flow<CommonMessage<TextContent>>.commandsWithParams(): Flow<Pair<CommonMessage<TextContent>, List<Pair<BotCommandTextSource, Array<TextSource>>>>> = mapNotNull { fun Flow<CommonMessage<TextContent>>.commandsWithParams(): Flow<Pair<CommonMessage<TextContent>, List<Pair<BotCommandTextSource, Array<TextSource>>>>> = mapNotNull {
it to it.content.textSources.parseCommandsWithArgsSources().toList() it to it.content.textSources.parseCommandsWithArgsSources().toList()
} }
/** /**
* Map the commands with their arguments and source messages * Uses [parseCommandsWithArgs] on incoming text sources and map them with [CommonMessage]
*/ */
fun Flow<CommonMessage<TextContent>>.commandsWithArgs( fun Flow<CommonMessage<TextContent>>.commandsWithArgs(
argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex
@ -103,14 +103,14 @@ fun Flow<CommonMessage<TextContent>>.commandsWithArgs(
} }
/** /**
* Map the commands with their arguments and source messages * Uses [parseCommandsWithArgs] on incoming text sources and map them with [CommonMessage]
*/ */
fun Flow<CommonMessage<TextContent>>.commandsWithArgs( fun Flow<CommonMessage<TextContent>>.commandsWithArgs(
argsSeparator: String argsSeparator: String
): Flow<Pair<CommonMessage<TextContent>, List<Pair<String, Array<String>>>>> = commandsWithArgs(Regex(argsSeparator)) ): Flow<Pair<CommonMessage<TextContent>, List<Pair<String, Array<String>>>>> = commandsWithArgs(Regex(argsSeparator))
/** /**
* Map the commands with their arguments and source messages * Uses [parseCommandsWithNamedArgs] on incoming text sources and map them with [CommonMessage]
*/ */
fun Flow<CommonMessage<TextContent>>.commandsWithNamedArgs( fun Flow<CommonMessage<TextContent>>.commandsWithNamedArgs(
argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex, argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex,
@ -124,7 +124,7 @@ fun Flow<CommonMessage<TextContent>>.commandsWithNamedArgs(
} }
/** /**
* Map the commands with their arguments and source messages * Uses [parseCommandsWithNamedArgs] on incoming text sources and map them with [CommonMessage]
*/ */
fun Flow<CommonMessage<TextContent>>.commandsWithNamedArgs( fun Flow<CommonMessage<TextContent>>.commandsWithNamedArgs(
argsSeparator: String, argsSeparator: String,