This commit is contained in:
cdle
2021-10-12 16:55:34 +08:00
parent d1886acb5c
commit 2ceb31b8e5
+3 -2
View File
@@ -2,6 +2,7 @@ package core
import ( import (
"fmt" "fmt"
"strings"
"time" "time"
"github.com/beego/beego/v2/client/httplib" "github.com/beego/beego/v2/client/httplib"
@@ -11,7 +12,7 @@ func init() {
AddCommand("", []Function{ AddCommand("", []Function{
{ {
Rules: []string{ Rules: []string{
"^小爱同学$", "^小爱(.*)$",
}, },
Handle: func(s Sender) interface{} { Handle: func(s Sender) interface{} {
api := sillyGirl.Get("小爱同学") api := sillyGirl.Get("小爱同学")
@@ -26,7 +27,7 @@ func init() {
return str return str
} }
msg := s.Get() msg := s.Get()
if msg == "对话模式" { if strings.Contains(msg, "对话模式") {
stop := false stop := false
for { for {
if stop { if stop {