From 99a6c665557d5170641b261e283e69ac3a4f2c2b Mon Sep 17 00:00:00 2001 From: "1343396474@qq.com" <1343396474@qq.com> Date: Wed, 29 Jun 2022 22:47:55 +0800 Subject: [PATCH] make lint happy --- plugin/managerplugin/managerplugin.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugin/managerplugin/managerplugin.go b/plugin/managerplugin/managerplugin.go index 6aae76dfa5..9c8e832c7a 100644 --- a/plugin/managerplugin/managerplugin.go +++ b/plugin/managerplugin/managerplugin.go @@ -23,7 +23,7 @@ func init() { " - 开启全员禁言 群号\n" + " - 解除全员禁言 群号\n" + " - 踢出并拉黑 QQ号\n" + - " - 踢出(并拉黑)等级为[1-100]的人" + + " - 踢出(并拉黑)等级为[1-100]的人\n" + " - 反\"XX召唤术\"\n", PrivateDataFolder: "managerplugin", }) @@ -102,7 +102,7 @@ func init() { ctx.SendChain(message.Text("黑名单列表是空的~")) return } - ctx.SendChain(message.Text(blacklist)) + ctx.SendChain(message.Text(blacklist...)) }) engine.OnRegex(`踢出等级为([0-9]{1,3})的人`, zero.OnlyGroup, zero.AdminPermission).SetBlock(true). Handle(func(ctx *zero.Ctx) { @@ -168,8 +168,9 @@ func writeblacklist(groupid, userid int64) (err error) { func readblacklist(groupid int64) (bl []any, err error) { var b blacklist + bl = make([]any, 1, 128) + bl[0] = "黑名单列表\n" err = db.FindFor("blacklist", b, "GROUP BY gid", func() error { - var bl []any bl = append(bl, b.UserID, "\n") return nil })