Hi, I have a custom command for Nightbot to generate a random number between 1 and 1071:
$(eval Math.floor((Math.random() * 1071) + 1))
It basically uses the JavaScript example on the Eval command in the documentation.
The problem is… it’s not that random. I’ve used the command about 80 times over 25 days of streaming and it has returned a number that has been picked before 7 times now… which is mathematically extremely unlikely. I’m not sure if this is JavaScript/Nightbot or something else going on… it doesn’t look like you can seed the JS either so I’m at a bit of a loss as to what I can do.
Any suggestions on what can be changed/improved for a better random number generator command to use for Nightbot?
Thanks