This commit is contained in:
cdle
2021-10-06 14:52:21 +08:00
parent ad376ffb68
commit d2c69e2b89
6 changed files with 46 additions and 1 deletions
+5 -1
View File
@@ -79,6 +79,7 @@ func AddCommand(prefix string, cmds []Function) {
}
func handleMessage(sender Sender) {
defer sender.Finish()
for _, function := range functions {
for _, rule := range function.Rules {
var matched bool
@@ -109,10 +110,13 @@ func handleMessage(sender Sender) {
if rt != nil {
sender.Reply(rt)
}
sender.Finish()
if sender.IsContinue() {
goto goon
}
return
}
}
goon:
}
}