mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 22:00:11 +08:00
chore(lint): 改进代码样式 (#955)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
fa02189fad
commit
47f176a56e
2
main.go
2
main.go
@ -308,7 +308,7 @@ func init() {
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
if !strings.Contains(runtime.Version(), "go1.2") { // go1.20之前版本需要全局 seed,其他插件无需再 seed
|
if !strings.Contains(runtime.Version(), "go1.2") { // go1.20之前版本需要全局 seed,其他插件无需再 seed
|
||||||
rand.Seed(time.Now().UnixNano()) //nolint: staticcheck
|
rand.Seed(time.Now().UnixNano())
|
||||||
}
|
}
|
||||||
// 帮助
|
// 帮助
|
||||||
zero.OnFullMatchGroup([]string{"help", "/help", ".help", "菜单"}, zero.OnlyToMe).SetBlock(true).
|
zero.OnFullMatchGroup([]string{"help", "/help", ".help", "菜单"}, zero.OnlyToMe).SetBlock(true).
|
||||||
|
|||||||
@ -187,7 +187,6 @@ func init() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text("钱包余额修改成功,已修改用户:", uidStr, "的钱包,修改金额为:", amount))
|
ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text("钱包余额修改成功,已修改用户:", uidStr, "的钱包,修改金额为:", amount))
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 保留用户习惯,兼容旧语法“查看我的钱包”
|
// 保留用户习惯,兼容旧语法“查看我的钱包”
|
||||||
@ -211,7 +210,6 @@ func init() {
|
|||||||
|
|
||||||
en.OnPrefix(`钱包转账`, zero.OnlyGroup).SetBlock(true).Limit(ctxext.LimitByGroup).
|
en.OnPrefix(`钱包转账`, zero.OnlyGroup).SetBlock(true).Limit(ctxext.LimitByGroup).
|
||||||
Handle(func(ctx *zero.Ctx) {
|
Handle(func(ctx *zero.Ctx) {
|
||||||
|
|
||||||
param := strings.TrimSpace(ctx.State["args"].(string))
|
param := strings.TrimSpace(ctx.State["args"].(string))
|
||||||
|
|
||||||
// 捕获修改的金额
|
// 捕获修改的金额
|
||||||
@ -255,7 +253,5 @@ func init() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text("转账成功:成功给"), message.At(uidInt), message.Text(",转账:", amount, wallet.GetWalletName()))
|
ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text("转账成功:成功给"), message.At(uidInt), message.Text(",转账:", amount, wallet.GetWalletName()))
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user