From c576ed4e454fe6b4974e7ad873670e3adc9d0a96 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Fri, 2 Dec 2022 22:05:20 -0500 Subject: Fixes to various things --- commands/about.js | 2 +- commands/list.js | 2 +- commands/play.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'commands') diff --git a/commands/about.js b/commands/about.js index e102a3e..23c750e 100644 --- a/commands/about.js +++ b/commands/about.js @@ -22,7 +22,7 @@ import { EmbedBuilder, version, ActionRowBuilder, ButtonBuilder, ButtonStyle, SlashCommandBuilder } from 'discord.js'; // import npmPackage from '../package.json' assert { type:'json' } import { readFileSync } from 'node:fs'; -const npmPackage = JSON.parse(readFileSync('./package.json')); +const npmPackage = JSON.parse(readFileSync('./package.json', 'utf-8')); export default { data: new SlashCommandBuilder() diff --git a/commands/list.js b/commands/list.js index 05d40c6..8eddcda 100644 --- a/commands/list.js +++ b/commands/list.js @@ -20,7 +20,7 @@ ***************************************************************************/ import { SlashCommandBuilder } from 'discord.js'; -import { readdirSync, readdir } from 'fs'; +import { readdirSync, readdir } from 'node:fs'; const musicFolder = './music'; diff --git a/commands/play.js b/commands/play.js index 3b226ec..4c95ab8 100644 --- a/commands/play.js +++ b/commands/play.js @@ -48,7 +48,7 @@ export default { return await interaction.reply({ content: 'Number is too big, choose a number that\'s less than ' + files.length + '.', ephemeral: true }); } } - if (isAudioStatePaused === true) { + if (isAudioStatePaused) { toggleAudioState(); return await interaction.reply({ content: 'Resuming music', ephemeral: true }); } else { -- cgit v1.2.3