add more limiter (#241)

This commit is contained in:
源文雨
2022-05-26 13:55:14 +08:00
parent c8072171f0
commit cb1b7d5da7
5 changed files with 10 additions and 9 deletions

View File

@@ -35,7 +35,7 @@ func init() {
"- 来份萝莉\n" +
"- 设置随机图片地址[http...]",
}).ApplySingle(ctxext.DefaultSingle)
en.OnFullMatch("来份萝莉").SetBlock(true).
en.OnFullMatch("来份萝莉").Limit(ctxext.LimitByGroup).SetBlock(true).
Handle(func(ctx *zero.Ctx) {
go func() {
for i := 0; i < math.Min(cap(queue)-len(queue), 2); i++ {