PreMessageCommandRun Event

Is there a way of stopping the command from running as I've tried everything and nothing works
11 Replies
Favna
Favna14mo ago
Use preconditions
Spinel
Spinel14mo ago
D24
D2414mo ago
I don't wanna be adding and removing preconditions constantly ngl
Favna
Favna14mo ago
wdym
D24
D2414mo 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
Favna14mo 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
D2414mo 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
D2414mo ago
aka adding them here
No description
Favna
Favna14mo ago
preconditions can be configured to be global simply add position: ... in its constructor parameters
Favna
Favna14mo 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
D2414mo ago
ahh alr I see thanks
Want results from more Discord servers?
Add your server