Skip to content

Commit

Permalink
e
Browse files Browse the repository at this point in the history
  • Loading branch information
RileCraft committed Dec 2, 2021
1 parent 1095a04 commit a313b9e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
14 changes: 1 addition & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,7 @@
# Developer currently on break (V4 Big Update)

# 『 Changelog 』
<img src="https://emoji.gg/assets/emoji/3821-arroworange.png" width="18px" height="18px" alt="arroworange"> Fixed eval button not working , `userPermissions` not working properly.<br>
<img src="https://emoji.gg/assets/emoji/3821-arroworange.png" width="18px" height="18px" alt="arroworange"> Fixed bot not logging on reboot.<br>
<img src="https://emoji.gg/assets/emoji/3821-arroworange.png" width="18px" height="18px" alt="arroworange"> Revamped the entire handler.<br>
<img src="https://emoji.gg/assets/emoji/3821-arroworange.png" width="18px" height="18px" alt="arroworange"> Removed `authorOnly, expireAfter` options.<br>
<img src="https://emoji.gg/assets/emoji/3821-arroworange.png" width="18px" height="18px" alt="arroworange"> All the token , prefix , dev ids will now go in `Storage/Vault/Config.js`.<br>
<img src="https://emoji.gg/assets/emoji/3821-arroworange.png" width="18px" height="18px" alt="arroworange"> In slashCommands the `guild: "ID"` option has been changed to `guilds: ["ID", "ID", . . .]`<br>
<img src="https://emoji.gg/assets/emoji/3821-arroworange.png" width="18px" height="18px" alt="arroworange"> Aliases for slashCommands has been removed.<br>
<img src="https://emoji.gg/assets/emoji/3821-arroworange.png" width="18px" height="18px" alt="arroworange"> All the collection which stores the commands has been changed. (Refer to bot.js to view changes).<br>
<img src="https://emoji.gg/assets/emoji/3821-arroworange.png" width="18px" height="18px" alt="arroworange"> All the code has been minimalized and i have tried to kept it as simple as possible.<br>
<img src="https://emoji.gg/assets/emoji/3821-arroworange.png" width="18px" height="18px" alt="arroworange"> slashCommands are no longer required to be loaded from `Ready.js` event.<br>
<img src="https://emoji.gg/assets/emoji/3821-arroworange.png" width="18px" height="18px" alt="arroworange"> The main folder has been renamed from `Home` to `Root`.<br>
<img src="https://emoji.gg/assets/emoji/3821-arroworange.png" width="18px" height="18px" alt="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`.<br>
<img src="https://emoji.gg/assets/emoji/3821-arroworange.png" width="18px" height="18px" alt="arroworange"> Handler is currenty not 100% tested so if you encounter any bugs let us know!<br>
<img src="https://emoji.gg/assets/emoji/3821-arroworange.png" width="18px" height="18px" alt="arroworange"> Fixed `guildOnly` and `allowBots`.<br>

# 『 Currently Known Bugs 』
* None
Expand Down
6 changes: 1 addition & 5 deletions Root/Classes/CommandOptions/loadCommandOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
}
}
Expand Down
6 changes: 5 additions & 1 deletion Root/Events/MessageCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
}
}

0 comments on commit a313b9e

Please sign in to comment.