can i use preconditions in listeners

i have a few checks needed before running a group of different listeners, right now i have these checks in a helper function that i run at the start of each listener, but it would be nice to have them run automatically if i add a precondition
Solution:
no but preconditions are just glorified if checks so just extract the functionality to a function and call that function in both places
Jump to solution
2 Replies
Solution
Favna
Favna6mo ago
no but preconditions are just glorified if checks so just extract the functionality to a function and call that function in both places
iaqi
iaqiOP6mo ago
okay thanks
Want results from more Discord servers?
Add your server