diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2024-02-15 17:33:10 -0500 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2024-02-15 17:33:10 -0500 |
| commit | ec7a6d2cd4b0d25251d5e9691a148a2b07984509 (patch) | |
| tree | ff60a3e7cbc9746f74af26dce93a9ca8ece5200f /Commands/reshuffle.js | |
| parent | d98937b34bbb7582f4c13e0d18bcc30febe1d174 (diff) | |
| download | DLAP-ec7a6d2cd4b0d25251d5e9691a148a2b07984509.tar.gz DLAP-ec7a6d2cd4b0d25251d5e9691a148a2b07984509.tar.bz2 DLAP-ec7a6d2cd4b0d25251d5e9691a148a2b07984509.zip | |
Checking if player is not running for reshuffle; Made strings more consistent
Diffstat (limited to 'Commands/reshuffle.js')
| -rw-r--r-- | Commands/reshuffle.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Commands/reshuffle.js b/Commands/reshuffle.js index d4ecfc3..459575f 100644 --- a/Commands/reshuffle.js +++ b/Commands/reshuffle.js @@ -23,7 +23,7 @@ import { SlashCommandBuilder } from 'discord.js'; import { shufflePlaylist } from '../AudioBackend/QueueSystem.js'; import { PermissionFlagsBits } from 'discord-api-types/v10'; import { readFileSync } from 'node:fs'; -import { audioState } from '../AudioBackend/AudioControl.js'; +import { audioState, playerStatus } from '../AudioBackend/AudioControl.js'; import i18next from '../Utilities/i18n.js'; // import config from './config.json' assert {type: 'json'} @@ -36,7 +36,7 @@ export default { async execute(interaction, bot) { if (!interaction.member.voice.channel) return await interaction.reply({ content: t('voicePermission'), ephemeral: true }); if (!interaction.member.roles.cache.has(djRole) && interaction.user.id !== ownerID && !interaction.memberPermissions.has(PermissionFlagsBits.ManageGuild)) return interaction.reply({ content: t('rolePermission'), ephemeral: true }); - + if (playerStatus === 2) return await interaction.reply({ content: t('playerStopped'), ephemeral: true }); async function shuffleDetected(bot) { await interaction.reply({ content: t('reshufflePlaylist'), ephemeral: true }); await audioState(2); |
