From c0a963fcbfcd130d1d9e1df95cace0b10bb42cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20Steinh=C3=BCbl?= Date: Thu, 4 Apr 2024 16:54:33 +0200 Subject: [PATCH] fix: make the chance calculation correctly --- src/listeners/message_create.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/listeners/message_create.tsx b/src/listeners/message_create.tsx index 31bd270..f629326 100644 --- a/src/listeners/message_create.tsx +++ b/src/listeners/message_create.tsx @@ -33,7 +33,7 @@ function handleBunOnlyChannel(message: Message): boolean { } // 10% chance to react with a random bun emoji - if (Math.floor(Math.random() * 100) < 0) { + if (Math.random() < 0.1) { const emoji = getRandomBunEmoji(); message.react(`${emoji.name}:${emoji.id}`, true); return true;