mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 22:00:11 +08:00
19 lines
327 B
Go
19 lines
327 B
Go
package utils
|
|
|
|
import (
|
|
"github.com/wdvxdr1123/ZeroBot/message"
|
|
"math/rand"
|
|
"time"
|
|
)
|
|
|
|
func RandText(text ...[]string) message.MessageSegment {
|
|
length := len(text)
|
|
rand.Seed(time.Now().UnixNano())
|
|
return message.Text(text[rand.Intn(length)])
|
|
}
|
|
|
|
func Suiji() int {
|
|
rand.Seed(time.Now().UnixNano())
|
|
return rand.Intn(30)
|
|
}
|