diff --git a/commands/help.js b/commands/help.js index c0f5be1..1c54dff 100755 --- a/commands/help.js +++ b/commands/help.js @@ -1,4 +1,5 @@ const fs = require('fs') +const settings = require("../settings.json") const cmds = Object.create(null) const { getMessage } = require('../util/lang.js') @@ -15,6 +16,7 @@ for (const plugin of bpl) { } try { const commandName = plugin.split('.js')[0] + if(commandName == "settings" && settings.userSettingsDisabled) continue if (commandName !== 'help') { cmds[commandName] = require(`./${plugin}`) if (cmds[commandName].level === undefined) { diff --git a/util/commands.js b/util/commands.js index adf045f..c9c4b5b 100755 --- a/util/commands.js +++ b/util/commands.js @@ -1,4 +1,5 @@ const fs = require('fs') +const settings = require("../settings.json") const cmds = Object.create(null) const bpl = fs.readdirSync('./commands') for (const plugin of bpl) { @@ -7,6 +8,8 @@ for (const plugin of bpl) { } try { const commandName = plugin.split('.js')[0] + console.log(commandName) + if(commandName == "settings" && settings.userSettingsDisabled) continue cmds[commandName] = require(`../commands/${plugin}`) if (cmds[commandName].level === undefined) { cmds[commandName].level = 0