diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f2e1eb1fd4..9fccb7a76d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip 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 86a63efb23..61eed8ef21 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 @@ -18,8 +18,11 @@ fun List.parseCommandsWithParams( var currentBotCommandSource: BotCommandTextSource? = null var currentArgs = "" fun includeCurrent() = currentBotCommandSource ?.let { - result[it.command] = currentArgs.split(argsSeparator).toTypedArray() - currentArgs = "" + currentArgs = currentArgs.trim() + if (currentArgs.isNotEmpty()) { + result[it.command] = currentArgs.split(argsSeparator).toTypedArray() + currentArgs = "" + } } for (textSource in this) { if (textSource is BotCommandTextSource) {