From 752bd07c5db1003d9c4d4924cf9cb43488b0138e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Sun, 12 Sep 2021 17:38:52 +0300 Subject: [PATCH] client.config.maintenance to client.config.maintenanceMode --- src/Client.ts | 2 +- src/client/commands/list.js | 2 +- src/client/commands/play.js | 2 +- src/client/funcs/check.js | 4 ++-- src/config.js | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Client.ts b/src/Client.ts index af0c835..aba71a5 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -57,7 +57,7 @@ class RadioClient extends Client { this.funcs.logger("Bot", "Starting"); this.funcs.logger("Maintenance Mode", "Enabled"); - this.config.maintenance = true; + this.config.maintenanceMode = true; const commandFiles = fs.readdirSync(path.join("./src/client/commands")).filter(f => f.endsWith(".js")); for (const file of commandFiles) { diff --git a/src/client/commands/list.js b/src/client/commands/list.js index 59772f0..70ba290 100644 --- a/src/client/commands/list.js +++ b/src/client/commands/list.js @@ -17,7 +17,7 @@ module.exports = { const radio = client.radio.get(interaction.guild.id); - if(radio && !client.config.maintenance){ + if(radio && !client.config.maintenanceMode){ client.funcs.listStations(client, interaction); } else { let stations = `${client.stations.map(s => `**#** ${s.name}`).join('\n')}` diff --git a/src/client/commands/play.js b/src/client/commands/play.js index 3184e8f..2de1239 100644 --- a/src/client/commands/play.js +++ b/src/client/commands/play.js @@ -14,7 +14,7 @@ module.exports = { async execute(interaction, client) { let message = {}; - if(client.config.maintenance){ + if(client.config.maintenanceMode){ interaction.reply({ content: client.messageEmojis["error"] + client.messages.maintenance, ephemeral: true diff --git a/src/client/funcs/check.js b/src/client/funcs/check.js index e164cbb..4a5a216 100644 --- a/src/client/funcs/check.js +++ b/src/client/funcs/check.js @@ -1,8 +1,8 @@ -module.exports = function (client, interaction, command) { +module.exports = function check(client, interaction, command) { let message = {}; const radio = client.radio.get(interaction.guild.id); const permissions = interaction.channel.permissionsFor(interaction.user); - if(client.config.maintenance){ + if(client.config.maintenanceMode){ interaction.reply({ content: client.messageEmojis["error"] + client.messages.maintenance, ephemeral: true diff --git a/src/config.js b/src/config.js index dd005d8..0b1eca1 100644 --- a/src/config.js +++ b/src/config.js @@ -22,6 +22,6 @@ module.exports = { //Settings version: process.env.RADIOX_VERSION || process.env.npm_package_version, debug: process.env.DEBUG_MODE || false, - maintenance: false, + maintenanceMode: false, streamerMode: process.env.STREAMER_MODE || "auto" }