Change the rand seed to something actually random

pull/20/head
pocketjawa 2019-08-06 22:52:10 -04:00
parent 8ff9042596
commit 6cd0a56e26
1 changed files with 3 additions and 0 deletions

View File

@ -6,9 +6,11 @@ import (
"github.com/bwmarrin/discordgo" "github.com/bwmarrin/discordgo"
"github.com/bwmarrin/disgord/x/mux" "github.com/bwmarrin/disgord/x/mux"
"log" "log"
"math/rand"
"os" "os"
"os/signal" "os/signal"
"syscall" "syscall"
"time"
) )
var Session, _ = discordgo.New() var Session, _ = discordgo.New()
@ -17,6 +19,7 @@ var bot_channel string
var Router = mux.New() var Router = mux.New()
func init() { func init() {
rand.Seed(time.Now().UnixNano())
flag.StringVar(&bot_token, "t", "", "Discord Authentication Token") flag.StringVar(&bot_token, "t", "", "Discord Authentication Token")
flag.StringVar(&bot_channel, "bc", "", "Bot status channel") flag.StringVar(&bot_channel, "bc", "", "Bot status channel")
flag.Parse() flag.Parse()