fix: make the chance calculation correctly

This commit is contained in:
Jozef Steinhübl 2024-04-04 16:54:33 +02:00
parent 51576f410a
commit c0a963fcbf

View file

@ -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;