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
feat: on_application_command event #961
Conversation
@@ -1374,6 +1374,8 @@ def parse_message_reaction_remove_emoji(self, data) -> None: | |||
|
|||
def parse_interaction_create(self, data) -> None: | |||
interaction = self._get_client().get_interaction(data=data) | |||
if data["type"] == 2: # application command | |||
self.dispatch("application_command", interaction) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to provide the corresponding application command object with this event because Interaction.application_command
hasn't been set at this point.
|
||
.. versionadded:: 2.4 | ||
|
||
:param interaction: The interaction object containing the command information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I told you in a previous review comment, the interaction object at the time of dispatch doesn't actually contain the application command object.
Co-authored-by: Emre Terzioglu <50607143+EmreTech@users.noreply.github.com>
i do not have enough energy to continue this PR. |
Summary
closes #958
Checklist
task pyright
and fixed the relevant issues.