From 61e92f3b85e21bbcb950e8f9346c2361abdccacb Mon Sep 17 00:00:00 2001 From: David Haukeness Date: Tue, 31 Mar 2020 20:46:11 +0000 Subject: [PATCH] fixed root command to have trailing space --- utils.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils.go b/utils.go index c593c21..b618b16 100644 --- a/utils.go +++ b/utils.go @@ -50,8 +50,9 @@ func hasCommandPrefix(s string, baseCommand string, botName string, subCommands // isRootCommand determines if the command is the root command or name with no arguments func isRootCommand(s string, baseCommand string, botName string) bool { - botCommand := fmt.Sprintf("!%s", baseCommand) - nameCommand := fmt.Sprintf("@%s", botName) + // the space after is important because keybase autocompletes ! and @ with a space after + botCommand := fmt.Sprintf("!%s ", baseCommand) + nameCommand := fmt.Sprintf("@%s ", botName) if s == botCommand || s == nameCommand { return true }