help of help edit

Former-commit-id: a80a60a334667102f3e4e3a55389eff39e774183
botanswer
AnisB 3 years ago
parent 9f673d799c
commit 7d07dc91f9

@ -108,11 +108,19 @@ type HelloCmd struct {
}
func (*HelloCmd) Run(args []string) (string, error) {
for _, result := range args {
/*for _, result := range args {
if result == "help" {
return "help of hello", nil
}
}*/
if len(args) != 0 && args[0] == "help" {
fmt.Println("Inside 1")
return "help of hello", nil
} else if len(args) != 0 && args[0] != "help" {
return "unkown command", nil
}
return "Hi, My name is Skynet 1.0. \n How can I help you ? ", nil
}

Loading…
Cancel
Save