Skip to content

Commit

Permalink
reuse variables
Browse files Browse the repository at this point in the history
  • Loading branch information
shudorcl committed May 4, 2024
1 parent d10a099 commit d8def12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugin/bilibili/bilibili_parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func handleVideo(ctx *zero.Ctx) {
return
}
c, ok := ctx.State["manager"].(*ctrl.Control[*zero.Ctx])
if ok && c.GetData(ctx.Event.GroupID)&0x10 == 0x10 {
if ok && c.GetData(ctx.Event.GroupID)&enableHex == enableHex {
summaryMsg, err := getVideoSummary(card)
if err != nil {
ctx.SendChain(message.Text("ERROR: ", err))
Expand Down
2 changes: 1 addition & 1 deletion plugin/saucenao/searcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func init() { // 插件主体
return
}
c, ok := ctx.State["manager"].(*ctrl.Control[*zero.Ctx])
if ok && c.GetData(ctx.Event.GroupID)&0x10 == 0x10 {
if ok && c.GetData(ctx.Event.GroupID)&enableHex == enableHex {
showPic = true
}
ctx.SendChain(message.Text("少女祈祷中..."))
Expand Down

0 comments on commit d8def12

Please sign in to comment.