From 86f15c75fec7da44a5db7ac1e2cef9fa203ba820 Mon Sep 17 00:00:00 2001 From: Darien Rousseau <45698803+not-pyroman@users.noreply.github.com> Date: Thu, 21 Dec 2023 22:50:16 -0600 Subject: [PATCH] put coin in the wrong spot --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 99c74f2..a0b8ea4 100644 --- a/index.js +++ b/index.js @@ -642,7 +642,7 @@ client.on("interactionCreate", async interaction => { }); // Flip the coin - Math.random() coin <= 0.5 ? "heads" : "tails"; + coin = Math.random() <= 0.5 ? "heads" : "tails"; side = interaction.options.getString("side"); outcome = coin == side ? true : false; // If they win, give them the prize, if they lose take up to double the prize away