mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-20 06:20:08 +08:00
🐛fix : setutime regex (#203)
This commit is contained in:
parent
0cc9420570
commit
9372902348
@ -97,7 +97,7 @@ func init() { // 插件主体
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
engine.OnRegex(`^添加(.+)\s?(\d+)$`, zero.SuperUserPermission, getdb).SetBlock(true).
|
engine.OnRegex(`^添加\s*([^0-9\s]+)\s*(\d+)$`, zero.SuperUserPermission, getdb).SetBlock(true).
|
||||||
Handle(func(ctx *zero.Ctx) {
|
Handle(func(ctx *zero.Ctx) {
|
||||||
var (
|
var (
|
||||||
imgtype = ctx.State["regex_matched"].([]string)[1]
|
imgtype = ctx.State["regex_matched"].([]string)[1]
|
||||||
@ -111,7 +111,7 @@ func init() { // 插件主体
|
|||||||
ctx.SendChain(message.Text("成功向分类", imgtype, "添加图片", id))
|
ctx.SendChain(message.Text("成功向分类", imgtype, "添加图片", id))
|
||||||
})
|
})
|
||||||
|
|
||||||
engine.OnRegex(`^删除(.+)\s?(\d+)$`, getdb, ctxext.FirstValueInList(pool), zero.SuperUserPermission).SetBlock(true).
|
engine.OnRegex(`^删除\s*([^0-9\s]+)\s*(\d+)$`, getdb, ctxext.FirstValueInList(pool), zero.SuperUserPermission).SetBlock(true).
|
||||||
Handle(func(ctx *zero.Ctx) {
|
Handle(func(ctx *zero.Ctx) {
|
||||||
var (
|
var (
|
||||||
imgtype = ctx.State["regex_matched"].([]string)[1]
|
imgtype = ctx.State["regex_matched"].([]string)[1]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user