Browse Source

Add seed to rng

develop
Matthew Faltys 7 years ago
parent
commit
e3ef92394f
  1. 2
      lorebot/lorebot.go

2
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)

Loading…
Cancel
Save