1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-29 13:38:43 +00:00

remove redundant extensions for parseCommandsWithParams

This commit is contained in:
InsanusMokrassar 2021-04-29 15:08:05 +06:00
parent 1e41e95333
commit 44e7c80f43

View File

@ -40,24 +40,10 @@ fun List<TextSource>.parseCommandsWithParams(
/** /**
* Parse commands and their args. Logic will find command, get all subsequent data as args until new command * Parse commands and their args. Logic will find command, get all subsequent data as args until new command
*/ */
fun TextedInput.parseCommandsWithParams( fun TextedWithTextSources.parseCommandsWithParams(
argsSeparator: Regex = defaultArgsSeparator
) = textSources.parseCommandsWithParams(argsSeparator)
/**
* Parse commands and their args. Logic will find command, get all subsequent data as args until new command
*/
fun TextedOutput.parseCommandsWithParams(
argsSeparator: Regex = defaultArgsSeparator argsSeparator: Regex = defaultArgsSeparator
) = textSources ?.parseCommandsWithParams(argsSeparator) ?: emptyMap() ) = textSources ?.parseCommandsWithParams(argsSeparator) ?: emptyMap()
/**
* Parse commands and their args. Logic will find command, get all subsequent data as args until new command
*/
fun CaptionedInput.parseCommandsWithParams(
argsSeparator: Regex = defaultArgsSeparator
) = textSources.parseCommandsWithParams(argsSeparator)
/** /**
* Parse commands and their args. Logic will find command, get all subsequent data as args until new command * Parse commands and their args. Logic will find command, get all subsequent data as args until new command
*/ */