aboutsummaryrefslogtreecommitdiff
path: root/commands/play.js
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2022-07-09 22:14:38 -0400
committerAndrew Lee <alee14498@protonmail.com>2022-07-09 22:14:38 -0400
commitd7e4cf29e6fc6b8f4ba07e837dcf56b3f5d63afc (patch)
treea6fd714025ec7fe78bd89d45d7f0fa36bc8f73aa /commands/play.js
parent4c26fbcb7e1674d5ccbb5468a32cd4a2bc2a315b (diff)
downloadDLAP-d7e4cf29e6fc6b8f4ba07e837dcf56b3f5d63afc.tar.gz
DLAP-d7e4cf29e6fc6b8f4ba07e837dcf56b3f5d63afc.tar.bz2
DLAP-d7e4cf29e6fc6b8f4ba07e837dcf56b3f5d63afc.zip
ESLint
Diffstat (limited to 'commands/play.js')
-rw-r--r--commands/play.js60
1 files changed, 30 insertions, 30 deletions
diff --git a/commands/play.js b/commands/play.js
index d206c56..324573d 100644
--- a/commands/play.js
+++ b/commands/play.js
@@ -19,38 +19,38 @@
*
***************************************************************************/
-import { SlashCommandBuilder } from '@discordjs/builders'
-import { isAudioStatePaused, inputAudio, audio, audioState, player, files } from '../AudioBackend.js'
-import { PermissionFlagsBits } from "discord-api-types/v10"
+import { SlashCommandBuilder } from '@discordjs/builders';
+import { isAudioStatePaused, inputAudio, audio, audioState, player, files } from '../AudioBackend.js';
+import { PermissionFlagsBits } from 'discord-api-types/v10';
export let integer;
export default {
- data: new SlashCommandBuilder()
- .setName('play')
- .setDescription('Resumes music')
- .addIntegerOption(option =>
- option.setName('int')
- .setDescription('Input a number for the selection for the audio file.'),
- )
- .setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
+ data: new SlashCommandBuilder()
+ .setName('play')
+ .setDescription('Resumes music')
+ .addIntegerOption(option =>
+ option.setName('int')
+ .setDescription('Input a number for the selection for the audio file.')
+ )
+ .setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
- async execute(interaction, bot) {
- integer = interaction.options.getInteger('int');
- if (integer) {
- if (integer < files.length) {
- await inputAudio(bot, integer);
- return await interaction.reply({content:`Now playing: ${audio}`, ephemeral:true});
- } else {
- return await interaction.reply({content:'Number is too big, choose a number that\'s less than ' + files.length + '.', ephemeral:true})
- }
- }
- if (isAudioStatePaused === true) {
- audioState();
- player.unpause();
- return await interaction.reply({content:'Resuming music', ephemeral:true});
- } else {
- return await interaction.reply({content:"Music is already playing", ephemeral:true})
- }
- },
-}; \ No newline at end of file
+ async execute (interaction, bot) {
+ integer = interaction.options.getInteger('int');
+ if (integer) {
+ if (integer < files.length) {
+ await inputAudio(bot, integer);
+ return await interaction.reply({ content: `Now playing: ${audio}`, ephemeral: true });
+ } else {
+ return await interaction.reply({ content: 'Number is too big, choose a number that\'s less than ' + files.length + '.', ephemeral: true });
+ }
+ }
+ if (isAudioStatePaused === true) {
+ audioState();
+ player.unpause();
+ return await interaction.reply({ content: 'Resuming music', ephemeral: true });
+ } else {
+ return await interaction.reply({ content: 'Music is already playing', ephemeral: true });
+ }
+ }
+};