feat: 添加帮助功能

This commit is contained in:
lixiangwuxian
2024-10-15 23:07:49 +08:00
parent ea3ef541e2
commit 48891fbd0a
12 changed files with 217 additions and 33 deletions

View File

@@ -2,9 +2,11 @@ package wsclient
import (
"encoding/json"
"fmt"
"log"
"net/url"
"git.lxtend.com/qqbot/action"
"git.lxtend.com/qqbot/constants"
"git.lxtend.com/qqbot/handler"
"git.lxtend.com/qqbot/model"
@@ -70,6 +72,9 @@ func (c *WebSocketClient) receiveMessages() {
go func() {
reply := handler.MsgInHandler(msg)
if reply.ReplyMsg != "" {
if reply.ReferOriginMsg {
reply.ReplyMsg = fmt.Sprintf("%s%s", action.GenReply(reply.FromMsg.OriginMsgId, "", 0, 0, 0), reply.ReplyMsg)
}
sendPkg := model.GenSendPkg(reply.FromMsg.UserId, reply.FromMsg.GroupInfo.GroupId, reply.ReplyMsg, false)
sendPkgJson, err := json.Marshal(sendPkg)
if err != nil {