Mrs4s / MiraiGo

qq协议的golang实现, 移植于mirai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

如何正确使用NewUrlShare() 函数发送链接分享消息

Hugozys opened this issue · comments

commented
		imageUrl := "http://i0.hdslb.com/bfs/archive/d1e7425c509776a6a11e19f4b2afbfb0e5c927e8.jpg"
		videoUrl := "https://www.bilibili.com/video/BV1CS4y1v7nr"
		title := "测试标题"
		content := "测试内容"
		send := message.NewUrlShare(videoUrl, title, content, imageUrl)
		mes := message.NewSendingMessage().Append(send)
		logger.Infof("sending message!!!!")
		b.SendGroupMessage(12345678, mes)

尝试使用如上样例代码向测试群发送链接分享。确保登录账号处于测试群内,但并没有看到机器人发送任何消息。
已经测试过:
UploadNewImage() => 图片消息
NewText() =>文本消息
均可成功发送。

想请问下该如何正确调用该API发送分享?