Skip to content

Commit

Permalink
fix(gif, qqwife): at 解析问题 (#960)
Browse files Browse the repository at this point in the history
Co-authored-by: hutiance <hutiance@newings.net.cn>
Co-authored-by: 源文雨 <41315874+fumiama@users.noreply.github.com>
  • Loading branch information
3 people committed Aug 21, 2024
1 parent adbcb39 commit 89a5b68
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugin/gif/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func init() { // 插件主体
PrivateDataFolder: "gif",
}).ApplySingle(ctxext.DefaultSingle)
datapath = file.BOTPATH + "/" + en.DataFolder()
en.OnRegex(`^(` + strings.Join(cmd, "|") + `)[\s\S]*?(\[CQ:(image\,file=([0-9a-zA-Z]{32}).*|at.+?(\d{5,11}))\].*|(\d+))$`).
en.OnRegex(`^(` + strings.Join(cmd, "|") + `)[\s\S]*?(\[CQ:(image\,file=([0-9a-zA-Z]{32}).*|at.+?qq=(\d{5,11})).*\].*|(\d+))$`).
SetBlock(true).Handle(func(ctx *zero.Ctx) {
list := ctx.State["regex_matched"].([]string)
atUserID, _ := strconv.ParseInt(list[4]+list[5]+list[6], 10, 64)
Expand Down
2 changes: 1 addition & 1 deletion plugin/qqwife/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func init() {
ctx.SendChain(message.Text("设置成功"))
})
// 单身技能
engine.OnRegex(`^(娶|嫁)\[CQ:at,qq=(\d+)\]`, zero.OnlyGroup, getdb, checkSingleDog).SetBlock(true).Limit(ctxext.LimitByUser).
engine.OnRegex(`^(娶|嫁)\[CQ:at,(?:\S*,)?qq=(\d+)(?:,\S*)?\]`, zero.OnlyGroup, getdb, checkSingleDog).SetBlock(true).Limit(ctxext.LimitByUser).
Handle(func(ctx *zero.Ctx) {
gid := ctx.Event.GroupID
uid := ctx.Event.UserID
Expand Down

0 comments on commit 89a5b68

Please sign in to comment.