Skip to content

Other Pages

Lehlogonolo Poole edited this page Aug 10, 2024 · 1 revision

Common Problems

  1. Files in the commands directory trying to be read as slash commmands by the CommandHandler class.

    • Example: This function is in the commands direcotory 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.

Credits

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!

Links

Clone this wiki locally