fixed root command to have trailing space

This commit is contained in:
2020-03-31 20:46:11 +00:00
parent a8b173036f
commit 61e92f3b85

View File

@ -50,6 +50,7 @@ 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 {
// 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 {