mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-12 10:10:25 +00:00
chore(lint): 改进代码样式 (#968)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
7b45374310
commit
ff62723e91
@@ -3,16 +3,17 @@ package niuniu
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
ctrl "github.com/FloatTech/zbpctrl"
|
||||
"github.com/FloatTech/zbputils/control"
|
||||
"github.com/FloatTech/zbputils/ctxext"
|
||||
zero "github.com/wdvxdr1123/ZeroBot"
|
||||
"github.com/wdvxdr1123/ZeroBot/extension/rate"
|
||||
"github.com/wdvxdr1123/ZeroBot/message"
|
||||
"math/rand"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -145,14 +146,14 @@ func init() {
|
||||
ctx.SendChain(message.Text("你已经注册过了"))
|
||||
return
|
||||
}
|
||||
//获取初始长度
|
||||
// 获取初始长度
|
||||
long := db.randLength()
|
||||
u := userInfo{
|
||||
UID: uid,
|
||||
Length: long,
|
||||
UserCount: 0,
|
||||
}
|
||||
//添加数据进入表
|
||||
// 添加数据进入表
|
||||
err := db.insertniuniu(&u, gid)
|
||||
if err != nil {
|
||||
err = db.createGIDTable(gid)
|
||||
@@ -241,4 +242,3 @@ func init() {
|
||||
func randomChoice(options []string) string {
|
||||
return options[rand.Intn(len(options))]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user