mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-12 10:10:25 +00:00
🎨 优化 ERROR 格式
This commit is contained in:
@@ -107,11 +107,11 @@ func init() {
|
||||
engine.OnRegex(`^百人一首之\s?(\d+)$`).SetBlock(true).Limit(ctxext.LimitByUser).Handle(func(ctx *zero.Ctx) {
|
||||
i, err := strconv.Atoi(ctx.State["regex_matched"].([]string)[1])
|
||||
if err != nil {
|
||||
ctx.SendChain(message.Text("ERROR:", err))
|
||||
ctx.SendChain(message.Text("ERROR: ", err))
|
||||
return
|
||||
}
|
||||
if i > 100 || i < 1 {
|
||||
ctx.SendChain(message.Text("ERROR:超出范围"))
|
||||
ctx.SendChain(message.Text("ERROR: 超出范围"))
|
||||
return
|
||||
}
|
||||
ctx.SendChain(
|
||||
|
||||
Reference in New Issue
Block a user