From 8fc0d3062bf5a98f6f0bcb04af778b9fa21feeb6 Mon Sep 17 00:00:00 2001 From: Daniel Tam Date: Wed, 10 Jun 2020 00:30:53 -0500 Subject: [PATCH] fixed rng seed to only be called once at initilization --- bunnybot.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bunnybot.go b/bunnybot.go index 93b9987..bd31af0 100644 --- a/bunnybot.go +++ b/bunnybot.go @@ -6,6 +6,8 @@ import ( "os/signal" "syscall" "strings" + "time" + "math/rand" "github.com/bwmarrin/discordgo" ) @@ -16,6 +18,9 @@ var ( ) func init() { + // set the randomized seed + rand.Seed(time.Now().UnixNano()) + // build the authentication struct build_auth()