Question
https://www.sapphirejs.dev/docs/Guide/preconditions/reporting-precondition-failure
Using this, how can it know if the preconditions error comes from the cooldown precondition
Sapphire Framework
Reporting precondition failure | Sapphire
When a precondition fails, it's usually important for the user to know why. For example, if they hit a cooldown or lack
3 Replies
You can check the
identifier
property on the UserError
thats passed into the listener. If it is Identifiers.PreconditionCooldown
, it came from the cooldown preconditionhow can I get the time where the command will be available again
In
error.context.remaining