diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2022-12-01 21:56:03 -0500 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2022-12-01 21:56:03 -0500 |
| commit | 894dd858c380e5ac8bcd882294f044c325ef379e (patch) | |
| tree | b275ce664f6cf48272d62835bd3010c0e71bc592 /commands/pause.js | |
| parent | 56573af6e6f5a839536483ea51ad1fc163f33458 (diff) | |
| download | DLAP-894dd858c380e5ac8bcd882294f044c325ef379e.tar.gz DLAP-894dd858c380e5ac8bcd882294f044c325ef379e.tar.bz2 DLAP-894dd858c380e5ac8bcd882294f044c325ef379e.zip | |
Modularized audio backend
Diffstat (limited to 'commands/pause.js')
| -rw-r--r-- | commands/pause.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/commands/pause.js b/commands/pause.js index dffcfb5..d5d8edc 100644 --- a/commands/pause.js +++ b/commands/pause.js @@ -20,7 +20,7 @@ ***************************************************************************/ import { SlashCommandBuilder } from 'discord.js'; -import { audioState, isAudioStatePaused, player } from '../AudioBackend.js'; +import { toggleAudioState, isAudioStatePaused } from '../backend/AudioControl.js'; import { PermissionFlagsBits } from 'discord-api-types/v10'; export default { @@ -30,8 +30,7 @@ export default { .setDefaultMemberPermissions(PermissionFlagsBits.Administrator), async execute(interaction) { if (isAudioStatePaused === false) { - audioState(); - player.pause(); + toggleAudioState(); return await interaction.reply({ content: 'Pausing music', ephemeral: true }); } else { return await interaction.reply({ content: 'Music is already paused', ephemeral: true }); |
