Browse Source

fixed root command to have trailing space

master
David Haukeness 5 years ago
parent
commit
61e92f3b85
No known key found for this signature in database
GPG Key ID: 54F2372DDB7F9462
  1. 1
      utils.go

1
utils.go

@ -50,6 +50,7 @@ func hasCommandPrefix(s string, baseCommand string, botName string, subCommands @@ -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 {

Loading…
Cancel
Save