From 891cf0ecdad9a1a78fdf5d127a60bdcc8e54ae5c Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Thu, 15 Feb 2024 20:19:36 -0500 Subject: Deploy command changes; Filter bots on vote; Fixed status --- Commands/about.js | 4 ++-- Commands/status.js | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'Commands') diff --git a/Commands/about.js b/Commands/about.js index d8afa52..8e1d31d 100644 --- a/Commands/about.js +++ b/Commands/about.js @@ -36,9 +36,9 @@ export default { { name: t('aboutInfo'), value: t('aboutInfoValue') }, { name: t('aboutBotVersion'), value: `DLAP ${npmPackage.version}` }, { name: t('aboutCreator'), value: 'Andrew Lee (alee)' }, // Do not remove this since I created this :) - // { name: t('aboutContributors'), value: '[your name] (username)' }, + { name: t('aboutContributors'), value: 'Victor Moraes (Vicktor#7232) (Improving README)' }, // { name: t('aboutForked'), value: '[your name] (username)' }, - { name: t('aboutFrameworks'), value: `Discord.JS ${version} + Voice` }, + { name: t('aboutFrameworks'), value: `Discord.JS ${version}\nmusic-metadata` }, { name: t('aboutLicense'), value: 'GNU General Public License v3.0' } ) .setFooter({ text: '© Copyright 2020-2024 Andrew Lee' }) diff --git a/Commands/status.js b/Commands/status.js index d762187..fcc6c08 100644 --- a/Commands/status.js +++ b/Commands/status.js @@ -40,10 +40,10 @@ export default { // Get the members of the voice channel who have not voted yet const voiceChannel = interaction.member.voice.channel; - const members = voiceChannel.members.filter(m => !votes.has(m.id)); + const members = voiceChannel.members.filter(m => !votes.has(m.id) && !m.user.bot); // Calculate the number of votes required to skip the audio track - const votesRequired = Math.ceil((members.size - votes.size) / 2); + const votesRequired = Math.ceil(members.size / 2); if (audioID >= files.length) { audioName = t('playlistDone'); @@ -52,12 +52,10 @@ export default { if (!metadataEmpty) { try { const { common } = await parseFile('music/' + audioName); - audioName = common.title; + audioName = common.title ? common.title : audioName.split('.').slice(0, -1).join('.'); } catch (error) { console.error(error.message); } - } else { - audioName = audioName.split('.').slice(0, -1).join('.'); } } -- cgit v1.2.3