-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Hi,
Thanks for your great work.
I'm asking for a way to handle unknown commands.
My bot is handling 2 commands as the following.
slack.Command("shout <word>", func(conv hanu.ConversationInterface) {
str, _ := conv.String("word")
fmt.Println(conv.Message().Text())
conv.Reply(strings.ToUpper(str))
})
slack.Command("your version", func(conv hanu.ConversationInterface) {
conv.Reply("Thanks for asking! I'm running `%s`", "323")
})
I want the bot to reply a message such as I don't understand your command
when someone tries to send it an undefined command. Is it possible? Something like:
slack.UnknownCommand(func(conv hanu.ConversationInterface) {
conv.Reply("Thanks for asking! But I don't understand your command.")
})
Metadata
Metadata
Assignees
Labels
No labels