diff options
Diffstat (limited to 'Utilities')
| -rw-r--r-- | Utilities/Voting.js | 4 |
1 files changed, 2 insertions, 2 deletions
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 |
