From 7f8abdf0790f2766584181c2a999e3ba02f93a98 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Thu, 9 May 2024 21:42:11 -0600 Subject: [PATCH] Add max volume. Not limiting it was a horrible idea --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 9d7fba0..26c9ecb 100644 --- a/index.js +++ b/index.js @@ -969,6 +969,7 @@ discord.on("interactionCreate", async (interaction) => { volume = interaction.options.getInteger("volume")/100; // Make sure volume isnt negative if (volume < 0) volume = 0; + if (volume > 1) volume = 1; res = setVolume(channel, volume) if (res) { interaction.reply({ content: `Set volume to ${volume*100}%` });