diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2022-12-20 21:22:04 -0500 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2022-12-20 23:59:21 -0500 |
| commit | a1eb0704666f613857c7cf87234c1fd485e97942 (patch) | |
| tree | eec0ef2dd040418871f51b9fc6c44d9be84547d5 /Utilities | |
| parent | e5a51721f84503458b1c1597a0776ad521f01c36 (diff) | |
| download | DLAP-a1eb0704666f613857c7cf87234c1fd485e97942.tar.gz DLAP-a1eb0704666f613857c7cf87234c1fd485e97942.tar.bz2 DLAP-a1eb0704666f613857c7cf87234c1fd485e97942.zip | |
Fixes
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 |
