Files
utils/tencentx/wechatx/message.go
T

21 lines
374 B
Go
Raw Normal View History

2023-09-16 20:14:20 +08:00
package wechatx
import (
"time"
uuid "github.com/satori/go.uuid"
)
// 构造消息
func (w *wechat) BuildTextMsg(to string, content string) *WechatMessage {
msg := &WechatMessage{
ToUserName: to,
FromUserName: w.sourceId,
CreateTime: time.Now().Unix(),
MsgType: "text",
Content: content,
MsgId: uuid.NewV4().String(),
}
return msg
}