Code Errors

If your code runs into an error, don't worry!

Using Discord.Short, your program will not shut down. You can also add an error message if something goes wrong, you can do it by running this:

ds.setCodeErrorReply('Sorry, Something Went Wrong 😨');

Then, we can write an error in our command:

new ds.Command({
    name: 'ping',
    async execute({send}) {
        lol; // <-- undefined
    }
});

Then when we run the command in discord, it will show the error message:

Last updated