修改后端支持,使用NapCatQQ,修改发送消息接口

This commit is contained in:
liyp 2024-07-09 15:35:59 +08:00
parent 4ec2cee24a
commit 6b8d132620

View file

@ -121,11 +121,11 @@ func (s *StdAns) SendMsg(msg string) bool {
return false
}
requestBody, err := json.Marshal(map[string]interface{}{
"action": "send_msg",
"params": map[string]interface{}{
// "action": "send_msg",
// "params": map[string]interface{}{
"group_id": s.GID,
"message": msg,
},
// },
})
if err != nil {
fmt.Println("Error marshaling JSON:", err)
@ -138,7 +138,7 @@ func (s *StdAns) SendMsg(msg string) bool {
}
// fmt.Println(string(re))
url := cfg["POSTURL"].(string)
url := cfg["POSTURL"].(string) + "/send_msg"
// println("core:", url)
// fmt.Println("请求地址:", url)
fmt.Println("响应信息:\n", msg)