mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 00:03:48 +00:00
update kdocs
This commit is contained in:
parent
080db09d2c
commit
2b938903b6
@ -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 {
|
||||
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(
|
||||
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(
|
||||
argsSeparator: String
|
||||
): 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(
|
||||
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(
|
||||
argsSeparator: String,
|
||||
|
Loading…
Reference in New Issue
Block a user