-
Notifications
You must be signed in to change notification settings - Fork 0
Other Pages
Lehlogonolo Poole edited this page Aug 10, 2024
·
1 revision
-
Files in the
commandsdirectory trying to be read as slash commmands by theCommandHandlerclass.- Example: This function is in the
commandsdirecotory as it is used by multiple commands, but is not a commands itself.
const function a(userBalance) { return userBalance > 0 ? true : false; } module.exports = a;
- The Command Reader will try to read it but error as it is not a command it can read, to avoid this, make sure you export the
isCommand(Set to false) property with the function.
const function a(userBalance) { return userBalance > 0 ? true : false; } module.exports = {a, isCommand = false};
- Usually, the reader should skip over anything it can read, but if needed, this will immediately make it skip.
- Example: This function is in the
Huge credit to underctrl, Code would've not been possible if i did not watch his helpful discord.js tutorials! I had to give him credit because this package is based off moving all those files fromm his tutorial into one package.
He probably has a way better package, so go check his out!