From e3ef92394f9bf4dda1b1482aea52cd3e632b628c Mon Sep 17 00:00:00 2001 From: Matthew Faltys Date: Tue, 20 Feb 2018 14:49:22 -0600 Subject: [PATCH] Add seed to rng --- lorebot/lorebot.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lorebot/lorebot.go b/lorebot/lorebot.go index d3e4f7b..afc4876 100644 --- a/lorebot/lorebot.go +++ b/lorebot/lorebot.go @@ -317,6 +317,8 @@ func rnghandler(rtm *slack.RTM, ev *slack.MessageEvent, redisClient *redis.Clien glogger.Error.Println(err) println(err) } + // pick a random one + rand.Seed(time.Now().UnixNano()) rngLore := fmt.Sprint(command[rand.Intn(len(command))]) println(rngLore)