修改后端支持,使用NapCatQQ,修改发送消息接口
This commit is contained in:
parent
4ec2cee24a
commit
6b8d132620
1 changed files with 6 additions and 6 deletions
|
@ -121,11 +121,11 @@ func (s *StdAns) SendMsg(msg string) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
requestBody, err := json.Marshal(map[string]interface{}{
|
requestBody, err := json.Marshal(map[string]interface{}{
|
||||||
"action": "send_msg",
|
// "action": "send_msg",
|
||||||
"params": map[string]interface{}{
|
// "params": map[string]interface{}{
|
||||||
"group_id": s.GID,
|
"group_id": s.GID,
|
||||||
"message": msg,
|
"message": msg,
|
||||||
},
|
// },
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error marshaling JSON:", err)
|
fmt.Println("Error marshaling JSON:", err)
|
||||||
|
@ -138,7 +138,7 @@ func (s *StdAns) SendMsg(msg string) bool {
|
||||||
}
|
}
|
||||||
// fmt.Println(string(re))
|
// fmt.Println(string(re))
|
||||||
|
|
||||||
url := cfg["POSTURL"].(string)
|
url := cfg["POSTURL"].(string) + "/send_msg"
|
||||||
// println("core:", url)
|
// println("core:", url)
|
||||||
// fmt.Println("请求地址:", url)
|
// fmt.Println("请求地址:", url)
|
||||||
fmt.Println("响应信息:\n", msg)
|
fmt.Println("响应信息:\n", msg)
|
||||||
|
|
Loading…
Reference in a new issue