diff --git a/README.md b/README.md index 0274b8d..35e1f35 100644 --- a/README.md +++ b/README.md @@ -7,19 +7,7 @@ # Developer currently on break (V4 Big Update) # 『 Changelog 』 -arroworange Fixed eval button not working , `userPermissions` not working properly.
-arroworange Fixed bot not logging on reboot.
-arroworange Revamped the entire handler.
-arroworange Removed `authorOnly, expireAfter` options.
-arroworange All the token , prefix , dev ids will now go in `Storage/Vault/Config.js`.
-arroworange In slashCommands the `guild: "ID"` option has been changed to `guilds: ["ID", "ID", . . .]`
-arroworange Aliases for slashCommands has been removed.
-arroworange All the collection which stores the commands has been changed. (Refer to bot.js to view changes).
-arroworange All the code has been minimalized and i have tried to kept it as simple as possible.
-arroworange slashCommands are no longer required to be loaded from `Ready.js` event.
-arroworange The main folder has been renamed from `Home` to `Root`.
-arroworange The old way of using `HOME` to get root path has been replaced with `ROOT.path` and the config can be accessed using `Root.config`.
-arroworange Handler is currenty not 100% tested so if you encounter any bugs let us know!
+arroworange Fixed `guildOnly` and `allowBots`.
# 『 Currently Known Bugs 』 * None diff --git a/Root/Classes/CommandOptions/loadCommandOptions.js b/Root/Classes/CommandOptions/loadCommandOptions.js index 006d0aa..8a51f53 100644 --- a/Root/Classes/CommandOptions/loadCommandOptions.js +++ b/Root/Classes/CommandOptions/loadCommandOptions.js @@ -21,11 +21,7 @@ module.exports = async function (client, message, command, isInteraction, intera if (!command) return; let args = message.content.slice(prefix.length).trim() if (args.toLowerCase().startsWith(cmdName)) args = args.slice(cmdName.length).trim().split(" ") - if (command.guildOnly == false) command.run(client, message, args, Discord) - else if (!message.guild) return; - else if (command.allowBots) command.run(client, message, args, Discord) - else if (message.author.bot) return; - else command.run(client, message, args, Discord) + command.run(client, message, args, Discord) }) } } diff --git a/Root/Events/MessageCreate.js b/Root/Events/MessageCreate.js index bd7cc20..b8a54e1 100644 --- a/Root/Events/MessageCreate.js +++ b/Root/Events/MessageCreate.js @@ -7,7 +7,11 @@ module.exports = { const command = client.commands.normal.get(cmdName) ?? client.commands.normal.get(client.commands.normal.aliases.get(cmdName)) if (!command) return; const loadCommandOptions = require(`${ROOT.path}/Root/Classes/CommandOptions/loadCommandOptions`) - loadCommandOptions(client, message, command, false) + if (command.allowBots) loadCommandOptions(client, message, command, false) + else if (message.author.bot) return; + else if (command.guildOnly == false) loadCommandOptions(client, message, command, false) + else if (!message.guild) return; + else loadCommandOptions(client, message, command, false) }) } } \ No newline at end of file