Skip to content

请问是否可以新构造一条合并转发消息? #58

Answered by Yukari316
Alex1911-Jiang asked this question in Q&A
Discussion options

You must be logged in to vote

可以试一试使用 CustomNode 完成消息的构建
每一个 CustomNode 就是一个消息节点
每一个消息节点可以是一条别人发送的消息,或者是自己凭空生成的消息,也可以是另一个合并转发套娃
具体的使用方法请参考gocq的文档:合并转发消息节点

这个是我自己在机器人中构建消息并发送的一个示范:

var customNodes = new List<CustomNode>();
for (int i = 0; i < count; i++)
{
    customNodes.Add(new CustomNode("色色", 114514, SoraSegment.Image($"{imageUrl}/{i}")));
}
await eventArgs.SourceGroup.SendGroupForwardMsg(customNodes);

这是效果:

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Alex1911-Jiang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants