Should I create multiple interaction handlers for each interaction type?
If I'm understanding correctly the point of the
parse
method is to determine whether a specific interaction handler should run, so that means we can create multiple handlers of the same type (Button for example) right?
The guide does mention this is possible for listeners but doesn't say anything about it for interaction handlers so I just wanted to confirm, thanks!Solution:Jump to solution
Yeah, you probably don't want the code to handle every type of button in the same handler. For instance, I have one handler that deals with buttons on polls, a separate handler that deals with confirm/deny buttons, and another one that just deals with dismissing & disabling message components.
2 Replies
Solution
Yeah, you probably don't want the code to handle every type of button in the same handler. For instance, I have one handler that deals with buttons on polls, a separate handler that deals with confirm/deny buttons, and another one that just deals with dismissing & disabling message components.
Ok makes sense, thank you!