-
-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specialize InteractionCreateEvent #1777
Comments
I just stumbled across this issue and i would like to implement it. Taking a first look at this, the
|
is the way to go |
btw if events should be subclasses to have "correct typing" like this then shouldn't this be applied to stuff like channel events as well |
For these Interaction events it makes more sense because 90% of the people using InteractionCreate use it for handling components since Command interactions are often handled by your command handler lib. And then it would be way nicer to have dedicated events because you dont have to make extra checks and you have better typing |
Summary
Specialize
InteractionCreateEvent
into the different interaction types, similar howMessageCreateEvent
is specialized for guilds and dmsWhy is this needed?
Nicer DX
Ideal implementation
Provide more concrete subclasses with correct typing for
interaction
.Checklist
The text was updated successfully, but these errors were encountered: