mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-06 15:20:22 +00:00
✨ add more limiter (#241)
This commit is contained in:
@@ -58,7 +58,7 @@ func init() {
|
||||
logrus.Infof("[tarot]读取%d张塔罗牌", len(cardMap))
|
||||
return true
|
||||
},
|
||||
)).SetBlock(true).Limit(ctxext.LimitByUser).Handle(func(ctx *zero.Ctx) {
|
||||
)).SetBlock(true).Limit(ctxext.LimitByGroup).Handle(func(ctx *zero.Ctx) {
|
||||
match := ctx.State["regex_matched"].([]string)[1]
|
||||
n := 1
|
||||
reasons := [...]string{"您抽到的是~\n", "锵锵锵,塔罗牌的预言是~\n", "诶,让我看看您抽到了~\n"}
|
||||
@@ -148,7 +148,7 @@ func init() {
|
||||
}
|
||||
return true
|
||||
},
|
||||
)).SetBlock(true).Limit(ctxext.LimitByUser).Handle(func(ctx *zero.Ctx) {
|
||||
)).SetBlock(true).Limit(ctxext.LimitByGroup).Handle(func(ctx *zero.Ctx) {
|
||||
match := ctx.State["regex_matched"].([]string)[1]
|
||||
info, ok := infoMap[match]
|
||||
if ok {
|
||||
|
||||
Reference in New Issue
Block a user