fix: 设精

This commit is contained in:
源文雨 2022-11-09 23:28:08 +08:00
parent 85f5fb2d87
commit 644a6cdcc2

View File

@ -583,7 +583,7 @@ func init() { // 插件主体
}
})
// 设精
engine.OnRegex(`^\[CQ:reply,id=(\d+)\].*(设置|取消)精华$`, zero.OnlyGroup, zero.AdminPermission).SetBlock(true).Limit(ctxext.LimitByUser).Handle(func(ctx *zero.Ctx) {
engine.OnRegex(`^\[CQ:reply,id=(\d+)\][\s\S]*(设置|取消)精华$`, zero.OnlyGroup, zero.AdminPermission).SetBlock(true).Limit(ctxext.LimitByUser).Handle(func(ctx *zero.Ctx) {
essenceID, _ := strconv.ParseInt(ctx.State["regex_matched"].([]string)[1], 10, 64)
option := ctx.State["regex_matched"].([]string)[2]
var rsp zero.APIResponse