mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
✏️ 暂时不使用 1.17 新特性
This commit is contained in:
parent
8233950bad
commit
f3ddff720f
@ -15,7 +15,9 @@ const (
|
||||
)
|
||||
|
||||
func init() { // 插件主体
|
||||
rand.Seed(time.Now().UnixMicro())
|
||||
// TODO: 1.17 特性暂不增加
|
||||
// rand.Seed(time.Now().UnixMicro())
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
zero.OnFullMatchGroup([]string{"waifu", "随机waifu"}).SetPriority(10).
|
||||
Handle(func(ctx *zero.Ctx) {
|
||||
miku := rand.Intn(100000) + 1
|
||||
|
||||
@ -15,10 +15,16 @@ const (
|
||||
)
|
||||
|
||||
func init() { // 插件主体
|
||||
rand.Seed(time.Now().UnixMicro())
|
||||
// TODO: 1.17 特性暂不增加
|
||||
// rand.Seed(time.Now().UnixMicro())
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
zero.OnFullMatchGroup([]string{"求签", "运势", "占卜"}, zero.OnlyToMe).SetPriority(10).
|
||||
Handle(func(ctx *zero.Ctx) {
|
||||
miku := rand.Intn(100) + 1
|
||||
ctx.SendChain(message.At(ctx.Event.UserID), message.Image(fmt.Sprintf(bed, miku, 0)), message.Image(fmt.Sprintf(bed, miku, 1)))
|
||||
ctx.SendChain(
|
||||
message.At(ctx.Event.UserID),
|
||||
message.Image(fmt.Sprintf(bed, miku, 0)),
|
||||
message.Image(fmt.Sprintf(bed, miku, 1)),
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user