From a1eb0704666f613857c7cf87234c1fd485e97942 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Tue, 20 Dec 2022 21:22:04 -0500 Subject: Fixes --- Utilities/Voting.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Utilities/Voting.js') diff --git a/Utilities/Voting.js b/Utilities/Voting.js index 2ee0629..ce837d5 100644 --- a/Utilities/Voting.js +++ b/Utilities/Voting.js @@ -60,11 +60,11 @@ export async function voteSkip(interaction, bot) { const members = voiceChannel.members.filter(m => !votes.has(m.id)); // Calculate the number of votes required to skip the audio track - const votesRequired = Math.ceil(members.size / 2); + const votesRequired = Math.ceil((members.size - votes.size) / 2); // Check if the message author has already voted if (votes.has(interaction.user.id)) { - return interaction.reply({ content: `You have already voted, wait ${votesRequired} more vote(s) to skip the audio track`, ephemeral: true }); + return interaction.reply({ content: `You have already voted, wait ${votesRequired - votes.size} more vote(s) to skip the audio track`, ephemeral: true }); } // Add the message author to the set of members who have voted -- cgit v1.2.3