From 44e7c80f43588a6a8038b2242cd4a567c16cd0ca Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 29 Apr 2021 15:08:05 +0600 Subject: [PATCH] remove redundant extensions for parseCommandsWithParams --- .../extensions/TextCaptionBotCommandsParser.kt | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/extensions/TextCaptionBotCommandsParser.kt b/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/extensions/TextCaptionBotCommandsParser.kt index 1fbc3edeb0..1b28ae2f9f 100644 --- a/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/extensions/TextCaptionBotCommandsParser.kt +++ b/tgbotapi.extensions.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/extensions/TextCaptionBotCommandsParser.kt @@ -40,24 +40,10 @@ fun List.parseCommandsWithParams( /** * Parse commands and their args. Logic will find command, get all subsequent data as args until new command */ -fun TextedInput.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( +fun TextedWithTextSources.parseCommandsWithParams( argsSeparator: Regex = defaultArgsSeparator ) = 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 */