client.config.maintenance to client.config.maintenanceMode

This commit is contained in:
Christer Warén 2021-09-12 17:38:52 +03:00
parent b08de94c64
commit 752bd07c5d
5 changed files with 6 additions and 6 deletions

View File

@ -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) {

View File

@ -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')}`

View File

@ -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

View File

@ -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

View File

@ -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"
}