diff --git a/workers/core.go b/workers/core.go index 3d72533..bcc4a32 100644 --- a/workers/core.go +++ b/workers/core.go @@ -5,7 +5,6 @@ import ( "encoding/json" "fmt" "go-bot/config" - "io" "net/http" ) @@ -67,17 +66,21 @@ func contains(slice []string, value string) bool { } func (s *StdAns) GetMsg() string { - if s.Parms[0] != "" { - return "咱也不知道 " + s.Parms[0] + "是啥呢!" - } else { + // 暂时设置权限校验不通过什么都不提示 + return "-1" + // if s.Parms[0] != "" { + // return "咱也不知道 " + s.Parms[0] + "是啥呢!" + // } else { - return "汝再调戏咱,咱可就生气了!!" - } + // return "汝再调戏咱,咱可就生气了!!" + // } } func (s *StdAns) SendMsg(msg string) bool { - + if msg == "-1" { + return false + } requestBody, err := json.Marshal(map[string]interface{}{ "action": "send_msg", "params": map[string]interface{}{ @@ -105,7 +108,7 @@ func (s *StdAns) SendMsg(msg string) bool { return false } defer resp.Body.Close() - res, _ := io.ReadAll(resp.Body) - fmt.Println("响应返回:", string(res)) + // res, _ := io.ReadAll(resp.Body) + // fmt.Println("响应返回:", string(res)) return true }