This commit is contained in:
cdle
2023-06-27 13:27:04 +08:00
parent 564ced7f4f
commit 3bdbb07ba3
11 changed files with 194 additions and 12 deletions
+2 -2
View File
@@ -185,11 +185,11 @@ func init() {
})
return true
})
adapter.SetReplyHandler(func(msg map[string]string) string {
adapter.SetReplyHandler(func(msg map[string]interface{}) string {
if debug {
logs.Debug("QQ发送消息:", string(utils.JsonMarshal(msg)))
}
if utils.IsZeroOrEmpty(msg[core.CHAT_ID]) {
if utils.IsZeroOrEmpty(msg[core.CHAT_ID].(string)) {
params := map[string]interface{}{
"user_id": msg[core.USER_ID],
"message": msg[core.CONETNT],
+3 -3
View File
@@ -85,12 +85,12 @@ func initWebBot() {
}
return false
})
adapter.SetReplyHandler(func(msg map[string]string) string {
adapter.SetReplyHandler(func(msg map[string]interface{}) string {
message := WebMessage{
UserID: msg[core.USER_ID],
UserID: msg[core.USER_ID].(string),
Images: []string{},
Type: "chat",
Content: msg[core.CONETNT],
Content: msg[core.CONETNT].(string),
}
sendWebMessage(&message)
return ""