PreMessageCommandRun Event

Is there a way of stopping the command from running as I've tried everything and nothing works
11 Replies
Favna
Favna2y ago
Use preconditions
Spinel
Spinel2y ago
D24
D24OP2y ago
I don't wanna be adding and removing preconditions constantly ngl
Favna
Favna2y ago
wdym
D24
D24OP2y ago
basically I'm implementing a blacklist system so I don't wanna be adding a Blacklist precondition every time Same goes for my development mode lock, I dont wanna add a precontion every time to check if a user is a developer
Favna
Favna2y ago
you dont seem to understand preconditions. You add them and then in that precondition you do your checks. And you return if they pass or not. If you read the guide it will make more sense
D24
D24OP2y ago
Ik what they are and how they work what I mean is I don't wanna be adding them to all the commands
D24
D24OP2y ago
aka adding them here
No description
Favna
Favna2y ago
preconditions can be configured to be global simply add position: ... in its constructor parameters
Favna
Favna2y ago
Sapphire Framework
Global preconditions | Sapphire
Sometimes you want a precondition that automatically runs for every command, without having to add it to each command.
D24
D24OP2y ago
ahh alr I see thanks

Did you find this page helpful?