Skip to content

发送cq码表情是这样吗?发送没有报错,但是接受到消息呢? #19

Answered by SlimeNull
867525168 asked this question in Q&A
Discussion options

You must be logged in to vote

一个使用消息匹配拓展插件的示例

[CqMessageMatch("^#face (?<content>.*)")]
public async Task Face(CqGroupMessagePostContext context, string content)
{
    if (CqFaceMsg.FromName(content) is CqFaceMsg face)
        await ActionSession.SendGroupMessageAsync(context.GroupId, new CqMessage(face));
}

经测试, 是可用的

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SlimeNull
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