From a3a528bd19c1060060947ad7e35b7c063bca764d Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sun, 24 Jul 2022 11:46:06 +0600 Subject: [PATCH] fix in CommandsPlugin double commands getting --- CHANGELOG.md | 2 ++ src/main/kotlin/CommandsPlugin.kt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa0143e..24bb27e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## 0.1.3 +* Fix of double commands getting on a start of bot + ## 0.1.2 * `Versions`: diff --git a/src/main/kotlin/CommandsPlugin.kt b/src/main/kotlin/CommandsPlugin.kt index 2e6f496..bec80df 100644 --- a/src/main/kotlin/CommandsPlugin.kt +++ b/src/main/kotlin/CommandsPlugin.kt @@ -72,7 +72,7 @@ object CommandsPlugin : Plugin { commandsKeeper.getKeys().forEach { val commands = commandsKeeper.getCommands(it) log.d { "Start setup initially passed commands for key $it: ${commands ?.joinToString { it.command }}" } - setScopeCommands(it, commandsKeeper.getCommands(it)) + setScopeCommands(it, commands) } log.d { "Complete setup initially passed commands" } }