mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 22:00:11 +08:00
chore(lint): 改进代码样式 (#982)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
6f7d4beb17
commit
54471d16e4
@ -320,7 +320,6 @@ func init() {
|
|||||||
}
|
}
|
||||||
// 添加数据进入表
|
// 添加数据进入表
|
||||||
if err := db.insertNiuNiu(&u, gid); err != nil {
|
if err := db.insertNiuNiu(&u, gid); err != nil {
|
||||||
|
|
||||||
if err = db.createGIDTable(gid); err != nil {
|
if err = db.createGIDTable(gid); err != nil {
|
||||||
ctx.SendChain(message.Text("ERROR:", err))
|
ctx.SendChain(message.Text("ERROR:", err))
|
||||||
return
|
return
|
||||||
@ -330,7 +329,6 @@ func init() {
|
|||||||
ctx.SendChain(message.Text("ERROR:", err))
|
ctx.SendChain(message.Text("ERROR:", err))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
ctx.SendChain(message.At(uid),
|
ctx.SendChain(message.At(uid),
|
||||||
message.Text("注册成功,你的牛牛现在有", u.Length, "cm"))
|
message.Text("注册成功,你的牛牛现在有", u.Length, "cm"))
|
||||||
@ -433,7 +431,6 @@ func init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
en.OnFullMatch("注销牛牛", getdb, zero.OnlyGroup).SetBlock(true).Handle(func(ctx *zero.Ctx) {
|
en.OnFullMatch("注销牛牛", getdb, zero.OnlyGroup).SetBlock(true).Handle(func(ctx *zero.Ctx) {
|
||||||
uid := ctx.Event.UserID
|
uid := ctx.Event.UserID
|
||||||
|
|||||||
@ -94,7 +94,6 @@ func processNiuniuAction(t string, niuniu userInfo, props string) (string, error
|
|||||||
load, ok := prop.Load(t)
|
load, ok := prop.Load(t)
|
||||||
u = niuniu
|
u = niuniu
|
||||||
if props != "" {
|
if props != "" {
|
||||||
|
|
||||||
if props != "伟哥" && props != "媚药" {
|
if props != "伟哥" && props != "媚药" {
|
||||||
return "", errors.New("道具不存在")
|
return "", errors.New("道具不存在")
|
||||||
}
|
}
|
||||||
@ -102,7 +101,6 @@ func processNiuniuAction(t string, niuniu userInfo, props string) (string, error
|
|||||||
if err = createUserInfoByProps(props, niuniu); err != nil {
|
if err = createUserInfoByProps(props, niuniu); err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
switch {
|
switch {
|
||||||
case ok && load.Count > 1 && time.Since(load.TimeLimit) < time.Minute*8:
|
case ok && load.Count > 1 && time.Since(load.TimeLimit) < time.Minute*8:
|
||||||
@ -124,7 +122,6 @@ func processNiuniuAction(t string, niuniu userInfo, props string) (string, error
|
|||||||
default:
|
default:
|
||||||
messages, f = generateRandomStingTwo(niuniu.Length)
|
messages, f = generateRandomStingTwo(niuniu.Length)
|
||||||
niuniu.Length = f
|
niuniu.Length = f
|
||||||
|
|
||||||
}
|
}
|
||||||
return messages, err
|
return messages, err
|
||||||
}
|
}
|
||||||
@ -306,7 +303,6 @@ func applySkill(myLength, oppoLength float64, increaseLength1 bool) (string, flo
|
|||||||
return fmt.Sprintf("哦吼!?你的牛牛在长大欸!长大了%.2fcm!", reduce), myLength, oppoLength
|
return fmt.Sprintf("哦吼!?你的牛牛在长大欸!长大了%.2fcm!", reduce), myLength, oppoLength
|
||||||
}
|
}
|
||||||
return fmt.Sprintf("你以绝对的长度让对方屈服了呢!你的长度增加%.2fcm,当前长度%.2fcm!", reduce, myLength), myLength, oppoLength
|
return fmt.Sprintf("你以绝对的长度让对方屈服了呢!你的长度增加%.2fcm,当前长度%.2fcm!", reduce, myLength), myLength, oppoLength
|
||||||
|
|
||||||
}
|
}
|
||||||
myLength -= reduce
|
myLength -= reduce
|
||||||
oppoLength += 0.8 * reduce
|
oppoLength += 0.8 * reduce
|
||||||
@ -314,7 +310,6 @@ func applySkill(myLength, oppoLength float64, increaseLength1 bool) (string, flo
|
|||||||
return fmt.Sprintf("哦吼!?看来你的牛牛因为击剑而凹进去了呢🤣🤣🤣!凹进去了%.2fcm!", reduce), myLength, oppoLength
|
return fmt.Sprintf("哦吼!?看来你的牛牛因为击剑而凹进去了呢🤣🤣🤣!凹进去了%.2fcm!", reduce), myLength, oppoLength
|
||||||
}
|
}
|
||||||
return fmt.Sprintf("对方以绝对的长度让你屈服了呢!你的长度减少%.2fcm,当前长度%.2fcm!", reduce, myLength), myLength, oppoLength
|
return fmt.Sprintf("对方以绝对的长度让你屈服了呢!你的长度减少%.2fcm,当前长度%.2fcm!", reduce, myLength), myLength, oppoLength
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// fence 根据长度计算减少的长度
|
// fence 根据长度计算减少的长度
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user