aboutsummaryrefslogtreecommitdiff
path: root/Commands
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2024-02-15 17:33:10 -0500
committerAndrew Lee <alee14498@protonmail.com>2024-02-15 17:33:10 -0500
commitec7a6d2cd4b0d25251d5e9691a148a2b07984509 (patch)
treeff60a3e7cbc9746f74af26dce93a9ca8ece5200f /Commands
parentd98937b34bbb7582f4c13e0d18bcc30febe1d174 (diff)
downloadDLAP-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')
-rw-r--r--Commands/reshuffle.js4
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);