From 0d26a5723c898c9a6b5e4f11dc202d9820bf0f57 Mon Sep 17 00:00:00 2001 From: KGT1 Date: Wed, 23 Sep 2020 17:59:56 +0200 Subject: [PATCH] fix wrong Jellyfin gradient colors --- src/messagehandler.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/messagehandler.js b/src/messagehandler.js index 7fc0d83..0406cfc 100644 --- a/src/messagehandler.js +++ b/src/messagehandler.js @@ -20,8 +20,9 @@ var isSummendByPlay = false; // random Color of the Jellyfin Logo Gradient function getRandomDiscordColor () { + let random = Math.random(); function randomNumber (b, a) { - return Math.floor((Math.random() * Math.pow(Math.pow((b - a), 2), 1 / 2)) + (b > a ? a : b)); + return Math.floor(random * Math.pow(Math.pow((b - a), 2), 1 / 2)) + (b > a ? a : b)); } const GRANDIENT_START = "#AA5CC3";