aboutsummaryrefslogtreecommitdiff
path: root/commands/play.js
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2022-12-01 21:56:03 -0500
committerAndrew Lee <alee14498@protonmail.com>2022-12-01 21:56:03 -0500
commit894dd858c380e5ac8bcd882294f044c325ef379e (patch)
treeb275ce664f6cf48272d62835bd3010c0e71bc592 /commands/play.js
parent56573af6e6f5a839536483ea51ad1fc163f33458 (diff)
downloadDLAP-894dd858c380e5ac8bcd882294f044c325ef379e.tar.gz
DLAP-894dd858c380e5ac8bcd882294f044c325ef379e.tar.bz2
DLAP-894dd858c380e5ac8bcd882294f044c325ef379e.zip
Modularized audio backend
Diffstat (limited to 'commands/play.js')
-rw-r--r--commands/play.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/commands/play.js b/commands/play.js
index f9701f7..fd8132c 100644
--- a/commands/play.js
+++ b/commands/play.js
@@ -20,7 +20,9 @@
***************************************************************************/
import { SlashCommandBuilder } from 'discord.js';
-import { isAudioStatePaused, inputAudio, audio, audioState, player, files } from '../AudioBackend.js';
+import { inputAudio } from '../backend/QueueSystem.js';
+import { files, isAudioStatePaused, toggleAudioState } from '../backend/AudioControl.js';
+import { audio } from '../backend/PlayAudio.js';
import { PermissionFlagsBits } from 'discord-api-types/v10';
export let integer;
@@ -46,8 +48,7 @@ export default {
}
}
if (isAudioStatePaused === true) {
- audioState();
- player.unpause();
+ toggleAudioState();
return await interaction.reply({ content: 'Resuming music', ephemeral: true });
} else {
return await interaction.reply({ content: 'Music is already playing', ephemeral: true });