Skip to content
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