Cooldown
When I set a command cooldown it doesn't seem to send a error message?
10 Replies
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
I checked that but wasn't sure if it's command denied
Nothing gets printed when trying to log
I can post code when home
please do
and I am using a slash command with
name of the listener file?
and did you rebuild ts?
Cooldown.ts
yeah I did I can try clear it
It should be
chatInputCommandDenied.ts
Or you can add { event: Events.ChatInputCommandDenied }
to the constructorahh I see, I missed that completely :S do you have an example for the constructor what I need inside it?
It's printing now so I can debug it and figure out the rest
thank you so much both of you two
As referenced on the guide page I linked before: https://www.sapphirejs.dev/docs/Guide/listeners/creating-your-own-listeners
Sapphire Framework
Creating your own listeners | Sapphire
Similar to what you learned in both Creating Commands and [Creating
oh I see
So to sum it up listeners needs the actual name of the listener exactly otherwise overriden in constructor, while preconditions can have any name
Either way I will read the guide more as it's very well-written and I missed a few things on it so thanks again!