Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Overwriting default error messages #7

Open
PineaFan opened this issue Feb 26, 2022 · 3 comments
Open

Overwriting default error messages #7

PineaFan opened this issue Feb 26, 2022 · 3 comments

Comments

@PineaFan
Copy link
Member

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

@Minion3665
Copy link
Member

Would it be acceptable to have an onCommandError event similar to discord.py so you can handle errors yourself instead?

@PineaFan
Copy link
Member Author

PineaFan commented Mar 4, 2022

Yes that's fine

@Minion3665
Copy link
Member

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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants