From fc8379d887d12a22f7bcc1d43ef68ae13152918a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= Date: Thu, 25 Jul 2019 06:50:58 +0200 Subject: [PATCH] I don't know why i did +1, Fixed a bug where it would sometime put "undefined" --- rand.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rand.js b/rand.js index c38b63a9..61c5733f 100644 --- a/rand.js +++ b/rand.js @@ -1,7 +1,7 @@ exports.random = function (text, message) { // Generate a random number function randNumber(file) { - let Rand = Math.floor((Math.random() * file.length) + 1); + let Rand = Math.floor((Math.random() * file.length)); return Rand; }