Skip to content

Commit

Permalink
fix baiduaudit的正则错误 (#495)
Browse files Browse the repository at this point in the history
修复一个正则错误,导致不能正确解析第二个ApiKey的问题
  • Loading branch information
GenesisAN committed Nov 12, 2022
1 parent 8e8464d commit df8a320
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/baiduaudit/audit.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ func init() {
config.Groups[ctx.Event.GroupID] = group
ctx.SendChain(message.At(ctx.Event.UserID), message.Text(fmt.Sprintf("本群%s已%s", k2, k1)))
})
engine.OnRegex(`^配置BDAKey\s*(.*)\s*(.*)$`, zero.SuperUserPermission).SetBlock(true).
engine.OnRegex(`^配置BDAKey\s(.*)\s(.*)$`, zero.SuperUserPermission).SetBlock(true).
Handle(func(ctx *zero.Ctx) {
k1 := ctx.State["regex_matched"].([]string)[1]
k2 := ctx.State["regex_matched"].([]string)[2]
Expand Down

0 comments on commit df8a320

Please sign in to comment.