Open PineaFan opened 2 years ago
Would it be acceptable to have an onCommandError event similar to discord.py so you can handle errors yourself instead?
Yes that's fine
Note: A fix to this should also handle the unhandledRejection
event and stop the bot from crashing; e.g.
promise = new Promise((resolve, reject) => reject("There was a problem..."));
process.on('unhandledRejection', error => {
console.log("We're saved!: " + error)
})
setTimeout(() => console.log("Here's something to keep the program running"), 10000)
The current message if you don't have permissions is a #FF0000 embed saying "You don't have permission to run this command", but this should be customisable with a colour, title, and message depending on the error
Also if possible, support for default colours such as "success" and "danger", which these errors will use when no colour is provided