diff --git a/plugin/baiduaudit/audit.go b/plugin/baiduaudit/audit.go index 799f450518..4c8ec6ad4c 100644 --- a/plugin/baiduaudit/audit.go +++ b/plugin/baiduaudit/audit.go @@ -157,7 +157,6 @@ func init() { if !find { msgs += "无" } - } else { // 生成配置文本 msgs = fmt.Sprintf("本群配置:\n"+ @@ -187,9 +186,9 @@ func init() { group := getGroup(ctx.Event.GroupID) inputType, _ := strconv.Atoi(k2) if k1 == "不" { - group.WhiteListType[inputType] = true //不检测:则进入类型白名单 + group.WhiteListType[inputType] = true // 不检测:则进入类型白名单 } else { - group.WhiteListType[inputType] = false //检测:则退出白名单 + group.WhiteListType[inputType] = false // 检测:则退出白名单 } config.Groups[ctx.Event.GroupID] = group ctx.SendChain(message.At(ctx.Event.UserID), message.Text(fmt.Sprintf("本群将%s检测%s类型内容", k1, typetext[inputType]))) @@ -324,7 +323,6 @@ func init() { } group := getGroup(ctx.Event.GroupID) ctx.SendChain(buildResp(bdres, group)...) - }) } @@ -367,10 +365,10 @@ func banCheck(ctx *zero.Ctx, bdres baiduRes) { } else { bantime = group.BANTime * 60 } - //执行禁言 + // 执行禁言 ctx.SetGroupBan(ctx.Event.GroupID, ctx.Event.UserID, bantime) } - //查看是否开启撤回提示 + // 查看是否开启撤回提示 if group.DMRemind { res = append(res, message.At(ctx.Event.Sender.ID)) ctx.SendChain(res...) diff --git a/plugin/manager/manager.go b/plugin/manager/manager.go index 18eb1f3087..bdb35b61ab 100644 --- a/plugin/manager/manager.go +++ b/plugin/manager/manager.go @@ -271,7 +271,7 @@ func init() { // 插件主体 // 删除需要撤回的消息ID ctx.DeleteMessage(message.NewMessageIDFromString(ctx.State["regex_matched"].([]string)[1])) // 删除请求撤回的消息ID - //ctx.DeleteMessage(message.NewMessageIDFromInteger(ctx.Event.MessageID.(int64))) + // ctx.DeleteMessage(message.NewMessageIDFromInteger(ctx.Event.MessageID.(int64))) }) // 群聊转发 engine.OnRegex(`^群聊转发.*?(\d+)\s(.*)`, zero.SuperUserPermission).SetBlock(true). diff --git a/plugin/qqwife/command.go b/plugin/qqwife/command.go index 1af9840a7a..2fe8669341 100644 --- a/plugin/qqwife/command.go +++ b/plugin/qqwife/command.go @@ -282,7 +282,7 @@ func init() { err = 民政局.清理花名册("group" + strconv.FormatInt(ctx.Event.GroupID, 10)) default: cmd := ctx.State["regex_matched"].([]string)[1] - gid, _ := strconv.ParseInt(cmd, 10, 64) //判断是否为群号 + gid, _ := strconv.ParseInt(cmd, 10, 64) // 判断是否为群号 if gid == 0 { ctx.SendChain(message.Text("请输入正确的群号")) return @@ -431,7 +431,6 @@ func (sql *婚姻登记) 清理花名册(gid ...string) error { for _, listName := range grouplist { if listName == "favorability" { continue - } err = sql.db.Drop(listName) } diff --git a/plugin/qqwife/function.go b/plugin/qqwife/function.go index 3fb5920971..73582c89f2 100644 --- a/plugin/qqwife/function.go +++ b/plugin/qqwife/function.go @@ -193,7 +193,7 @@ func init() { var choicetext string var ntrID = uid var targetID = fiancee - var greenID int64 //被牛的 + var greenID int64 // 被牛的 fianceeInfo, err := 民政局.查户口(gid, fiancee) switch { case err != nil: diff --git a/plugin/quan/quan.go b/plugin/quan/quan.go index fe84c2e0de..1269b9f036 100644 --- a/plugin/quan/quan.go +++ b/plugin/quan/quan.go @@ -3,13 +3,14 @@ package quan import ( "fmt" + "strconv" + "github.com/FloatTech/floatbox/web" ctrl "github.com/FloatTech/zbpctrl" "github.com/FloatTech/zbputils/control" zero "github.com/wdvxdr1123/ZeroBot" "github.com/wdvxdr1123/ZeroBot/message" "github.com/wdvxdr1123/ZeroBot/utils/helper" - "strconv" ) const ( @@ -25,8 +26,8 @@ func init() { // 主函数 "- 权重查询+QQ号(可以不写,默认本人)", }) en.OnRegex(`^权重查询\s*(\[CQ:at,qq=)?(\d+)?`).SetBlock(true).Handle(func(ctx *zero.Ctx) { - str := ctx.State["regex_matched"].([]string)[2] //获取uid - if str == "" { //user + str := ctx.State["regex_matched"].([]string)[2] // 获取uid + if str == "" { // user str = strconv.FormatInt(ctx.Event.UserID, 10) } es, err := web.GetData(fmt.Sprintf(quan, str)) // 将网站返回结果赋值 @@ -36,5 +37,4 @@ func init() { // 主函数 } ctx.SendChain(message.Text(str, helper.BytesToString(es))) // 输出结果 }) - } diff --git a/plugin/wenben/wenben.go b/plugin/wenben/wenben.go index 63cc862449..273286f2f8 100644 --- a/plugin/wenben/wenben.go +++ b/plugin/wenben/wenben.go @@ -4,20 +4,21 @@ package wenben import ( "encoding/json" "fmt" + "strings" + "github.com/FloatTech/floatbox/web" ctrl "github.com/FloatTech/zbpctrl" "github.com/FloatTech/zbputils/control" zero "github.com/wdvxdr1123/ZeroBot" "github.com/wdvxdr1123/ZeroBot/message" "github.com/wdvxdr1123/ZeroBot/utils/helper" - "strings" ) const ( tianqi = "https://xiaobai.klizi.cn/API/other/weather_1.php?data=&msg=%v" // api地址 pinyin = "http://ovooa.com/API/pinyin/api.php?type=text&msg=%v" yiyan = "https://v1.hitokoto.cn/?c=a&c=b&c=c&c=d&c=h&c=i" // 动漫 漫画 游戏 文学 影视 诗词 - kouling = "http://ovooa.com/API/rao/api.php?type=text" //口令 + kouling = "http://ovooa.com/API/rao/api.php?type=text" // 口令 tang = "http://api.btstu.cn/yan/api.php?charset=utf-8&encode=text" qing = "https://xiaobai.klizi.cn/API/other/wtqh.php" ) @@ -86,7 +87,7 @@ func init() { // 主函数 } ctx.SendChain(message.Text(helper.BytesToString(data))) }) - en.OnFullMatch("每日一言").SetBlock(true).Handle(func(ctx *zero.Ctx) { //每日一言 + en.OnFullMatch("每日一言").SetBlock(true).Handle(func(ctx *zero.Ctx) { // 每日一言 var rsp rspData data, err := web.GetData(yiyan) if err != nil { diff --git a/plugin/ygo/ygocdb.go b/plugin/ygo/ygocdb.go index b2c3356958..b72718dd3f 100644 --- a/plugin/ygo/ygocdb.go +++ b/plugin/ygo/ygocdb.go @@ -41,7 +41,7 @@ type searchResult struct { func init() { en := control.Register("ygocdb", &ctrl.Options[*zero.Ctx]{ DisableOnDefault: false, - Brief: "游戏王百鸽API",// 本插件基于游戏王百鸽API"https://www.ygo-sem.cn/" + Brief: "游戏王百鸽API", // 本插件基于游戏王百鸽API"https://www.ygo-sem.cn/" Help: "- /ydp [xxx]\n" + "- /yds [xxx]\n" + "- /ydb [xxx]\n" +