优化显示

This commit is contained in:
源文雨 2022-09-06 19:35:03 +08:00
parent 676ea312a3
commit f1e4a523ce
2 changed files with 6 additions and 6 deletions

View File

@ -55,9 +55,9 @@ func init() {
if err := managers.DoBlock(uid); err == nil { if err := managers.DoBlock(uid); err == nil {
cache.Set(uid, struct{}{}) cache.Set(uid, struct{}{})
ctx.SetGroupBan(gid, uid, 4*3600) ctx.SetGroupBan(gid, uid, 4*3600)
ctx.SendChain(message.Text("检测到违禁词,已封禁/屏蔽4小时")) ctx.SendChain(message.Text("检测到违禁词, 已封禁/屏蔽4小时"))
} else { } else {
ctx.SendChain(message.Text("block user error:", err)) ctx.SendChain(message.Text("block user error: ", err))
} }
return false return false
} }
@ -70,7 +70,7 @@ func init() {
if err := insertWord(ctx.Event.GroupID, args); err != nil { if err := insertWord(ctx.Event.GroupID, args); err != nil {
ctx.SendChain(message.Text("ERROR: ", err)) ctx.SendChain(message.Text("ERROR: ", err))
} else { } else {
ctx.SendChain(message.Text("添加违禁词 ", args, " 成功")) ctx.SendChain(message.Text("成功"))
} }
}) })
@ -80,7 +80,7 @@ func init() {
if err := deleteWord(ctx.Event.GroupID, args); err != nil { if err := deleteWord(ctx.Event.GroupID, args); err != nil {
ctx.SendChain(message.Text("ERROR: ", err)) ctx.SendChain(message.Text("ERROR: ", err))
} else { } else {
ctx.SendChain(message.Text("删除违禁词 ", args, " 成功")) ctx.SendChain(message.Text("成功"))
} }
}) })
@ -91,6 +91,6 @@ func init() {
ctx.SendChain(message.Text("ERROR: ", err)) ctx.SendChain(message.Text("ERROR: ", err))
return return
} }
ctx.SendChain(message.Text("本群违禁词有:\n"), message.Image("base64://"+binary.BytesToString(b))) ctx.SendChain(message.Text("本群违禁词有\n"), message.Image("base64://"+binary.BytesToString(b)))
}) })
} }

View File

@ -24,7 +24,7 @@ func onDel(uid int64, _ struct{}) {
return return
} }
if err := managers.DoUnblock(uid); err != nil { if err := managers.DoUnblock(uid); err != nil {
logrus.Error("do unblock error:", err) logrus.Errorln("[antiabuse] do unblock:", err)
} }
} }