From 9cd77628204771a24eaa2605e85aaa2a91b13f2b Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Sat, 27 Aug 2022 21:19:05 -0700 Subject: [PATCH] allow admin / other commands in any channel --- commands/help.js | 3 --- commands/money.js | 4 ---- commands/ping.js | 4 ---- commands/reset.js | 4 ---- commands/settings.js | 6 +----- commands/stats.js | 4 ---- 6 files changed, 1 insertion(+), 24 deletions(-) diff --git a/commands/help.js b/commands/help.js index ecb7b06..963504e 100644 --- a/commands/help.js +++ b/commands/help.js @@ -52,9 +52,6 @@ module.exports = { */ run: async (client, interaction, args, { GuildDB }) => { - if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) { - return interaction.send(`You are not allowed to use the bot in this channel.`); - } if (args[0].name == 'commands') { let Commands = client.commands.filter((cmd) => { return !cmd.debug diff --git a/commands/money.js b/commands/money.js index c194d1f..5d639c3 100644 --- a/commands/money.js +++ b/commands/money.js @@ -46,10 +46,6 @@ module.exports = { * @param {*} param3 */ run: async (client, interaction, args, { GuildDB }) => { - if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) { - return interaction.send(`You are not allowed to use the bot in this channel.`); - } - const permissions = bitfieldCalculator.permissions(interaction.member.permissions); let canUseCommand = false; diff --git a/commands/ping.js b/commands/ping.js index 54b956f..597997c 100644 --- a/commands/ping.js +++ b/commands/ping.js @@ -19,10 +19,6 @@ module.exports = { * @param {*} param3 */ run: async (client, interaction, args, { GuildDB }, start) => { - if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) { - return interaction.send(`You are not allowed to use the bot in this channel.`); - } - const end = new Date().getTime(); const pingEmbed = new EmbedBuilder() .setDescription(`🏓 **Pong!** Bot ping: ${end - start}ms`) diff --git a/commands/reset.js b/commands/reset.js index 22b76c7..085a6f6 100644 --- a/commands/reset.js +++ b/commands/reset.js @@ -27,10 +27,6 @@ module.exports = { * @param {*} param3 */ run: async (client, interaction, args, { GuildDB }) => { - if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) { - return interaction.send(`You are not allowed to use the bot in this channel.`); - } - const permissions = bitfieldCalculator.permissions(interaction.member.permissions); let canUseCommand = false; diff --git a/commands/settings.js b/commands/settings.js index 5e30859..f7f7f6f 100644 --- a/commands/settings.js +++ b/commands/settings.js @@ -346,11 +346,7 @@ module.exports = { * @param {string[]} args * @param {*} param3 */ - run: async (client, interaction, args, { GuildDB }) => { - if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) { - return interaction.send(`You are not allowed to use the bot in this channel.`); - } - + run: async (client, interaction, args, { GuildDB }) => { const permissions = bitfieldCalculator.permissions(interaction.member.permissions); let canUseCommand = false; diff --git a/commands/stats.js b/commands/stats.js index 4690ced..36468ec 100644 --- a/commands/stats.js +++ b/commands/stats.js @@ -19,10 +19,6 @@ module.exports = { * @param {*} param3 */ run: async (client, interaction, args, { GuildDB }, start) => { - if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) { - return interaction.send(`You are not allowed to use the bot in this channel.`); - } - const end = new Date().getTime(); const stats = new EmbedBuilder() .setColor(client.config.Colors.Default)