package util import ( "log" "strconv" "git.lxtend.com/lixiangwuxian/qqbot/action" "git.lxtend.com/lixiangwuxian/qqbot/qq_message" ) // NewSelfNodeMessage 创建一个合并转发消息内的消息列表,内容为content,发送者为当前登录的账号 func NewSelfNodeMessage(content ...any) *qq_message.NodeMessage { loginAccountInfo, err := action.GetLoginAccountInfo() if err != nil { log.Println("GetLoginAccountInfo error:", err) return nil } if loginAccountInfo == nil { return nil } return &qq_message.NodeMessage{Type: qq_message.TypeNode, Data: qq_message.NodeMessageData{UserID: strconv.FormatInt(int64(loginAccountInfo.Data.UserID), 10), Nickname: loginAccountInfo.Data.Nickname, Content: content}} }