diff --git a/handler/help/help.go b/handler/help/help.go index d6edb21..cec81ed 100644 --- a/handler/help/help.go +++ b/handler/help/help.go @@ -35,11 +35,8 @@ func help(msg model.Message) *model.Reply { nodeMsg.Data.UserID = "123456789" nodeMsg.Data.Nickname = "test" nodeMsg.Data.Content = []any{textMsg} - forwardMsg := message.NewForwardMessage() - forwardMsg.Data.ID = "10086" - forwardMsg.Data.Content = []any{nodeMsg} return &model.Reply{ - ReplyMsg: []any{&forwardMsg}, + ReplyMsg: []any{&nodeMsg}, ReferOriginMsg: false, FromMsg: msg, } diff --git a/message/forward.go b/message/forward.go index 9709674..f2be6d2 100644 --- a/message/forward.go +++ b/message/forward.go @@ -13,8 +13,8 @@ type ForwardMessage struct { } type ForwardMessageData struct { - ID string `json:"id"` // 转发消息ID - Content []interface{} `json:"content,omitempty"` // 转发消息内容 + ID string `json:"id"` // 转发消息ID + Content []any `json:"content,omitempty"` // 转发消息内容 } // NodeMessage 转发消息节点 @@ -24,10 +24,10 @@ type NodeMessage struct { } type NodeMessageData struct { - ID string `json:"id,omitempty"` // 转发消息ID - UserID string `json:"user_id,omitempty"` // 发送者QQ号 - Nickname string `json:"nickname,omitempty"` // 发送者昵称 - Content []interface{} `json:"content,omitempty"` // 消息内容 + ID string `json:"id,omitempty"` // 转发消息ID + UserID string `json:"user_id,omitempty"` // 发送者QQ号 + Nickname string `json:"nickname,omitempty"` // 发送者昵称 + Content []any `json:"content,omitempty"` // 消息内容 } func init() { diff --git a/model/message.go b/model/message.go index 32949db..69255f5 100644 --- a/model/message.go +++ b/model/message.go @@ -15,7 +15,7 @@ type GroupInfo struct { } type Reply struct { - ReplyMsg interface{} `json:"replyMsg"` - ReferOriginMsg bool `json:"referOriginMsg"` - FromMsg Message `json:"fromMsg"` + ReplyMsg any `json:"replyMsg"` + ReferOriginMsg bool `json:"referOriginMsg"` + FromMsg Message `json:"fromMsg"` }