mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-23 09:53:18 +00:00
client.config.maintenance to client.config.maintenanceMode
This commit is contained in:
parent
b08de94c64
commit
752bd07c5d
@ -57,7 +57,7 @@ class RadioClient extends Client {
|
|||||||
this.funcs.logger("Bot", "Starting");
|
this.funcs.logger("Bot", "Starting");
|
||||||
|
|
||||||
this.funcs.logger("Maintenance Mode", "Enabled");
|
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"));
|
const commandFiles = fs.readdirSync(path.join("./src/client/commands")).filter(f => f.endsWith(".js"));
|
||||||
for (const file of commandFiles) {
|
for (const file of commandFiles) {
|
||||||
|
@ -17,7 +17,7 @@ module.exports = {
|
|||||||
|
|
||||||
const radio = client.radio.get(interaction.guild.id);
|
const radio = client.radio.get(interaction.guild.id);
|
||||||
|
|
||||||
if(radio && !client.config.maintenance){
|
if(radio && !client.config.maintenanceMode){
|
||||||
client.funcs.listStations(client, interaction);
|
client.funcs.listStations(client, interaction);
|
||||||
} else {
|
} else {
|
||||||
let stations = `${client.stations.map(s => `**#** ${s.name}`).join('\n')}`
|
let stations = `${client.stations.map(s => `**#** ${s.name}`).join('\n')}`
|
||||||
|
@ -14,7 +14,7 @@ module.exports = {
|
|||||||
async execute(interaction, client) {
|
async execute(interaction, client) {
|
||||||
let message = {};
|
let message = {};
|
||||||
|
|
||||||
if(client.config.maintenance){
|
if(client.config.maintenanceMode){
|
||||||
interaction.reply({
|
interaction.reply({
|
||||||
content: client.messageEmojis["error"] + client.messages.maintenance,
|
content: client.messageEmojis["error"] + client.messages.maintenance,
|
||||||
ephemeral: true
|
ephemeral: true
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
module.exports = function (client, interaction, command) {
|
module.exports = function check(client, interaction, command) {
|
||||||
let message = {};
|
let message = {};
|
||||||
const radio = client.radio.get(interaction.guild.id);
|
const radio = client.radio.get(interaction.guild.id);
|
||||||
const permissions = interaction.channel.permissionsFor(interaction.user);
|
const permissions = interaction.channel.permissionsFor(interaction.user);
|
||||||
if(client.config.maintenance){
|
if(client.config.maintenanceMode){
|
||||||
interaction.reply({
|
interaction.reply({
|
||||||
content: client.messageEmojis["error"] + client.messages.maintenance,
|
content: client.messageEmojis["error"] + client.messages.maintenance,
|
||||||
ephemeral: true
|
ephemeral: true
|
||||||
|
@ -22,6 +22,6 @@ module.exports = {
|
|||||||
//Settings
|
//Settings
|
||||||
version: process.env.RADIOX_VERSION || process.env.npm_package_version,
|
version: process.env.RADIOX_VERSION || process.env.npm_package_version,
|
||||||
debug: process.env.DEBUG_MODE || false,
|
debug: process.env.DEBUG_MODE || false,
|
||||||
maintenance: false,
|
maintenanceMode: false,
|
||||||
streamerMode: process.env.STREAMER_MODE || "auto"
|
streamerMode: process.env.STREAMER_MODE || "auto"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user