Skip to content

Commit 2c3ffa3

Browse files
authored
fix: client, command and extension are missed in on_command event (#1243)
1 parent 3784072 commit 2c3ffa3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

interactions/api/gateway/client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,6 @@ def _dispatch_interaction_event(self, data: dict) -> None:
403403
_option = self.__sub_command_context(option, _context)
404404
__kwargs.update(_option)
405405

406-
self._dispatch.dispatch("on_command", _context)
407406
elif data["type"] == InteractionType.MESSAGE_COMPONENT:
408407
_name = f"component_{_context.data.custom_id}"
409408

interactions/client/models/command.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -902,6 +902,8 @@ async def wrapper(ctx: "CommandContext", *args, **kwargs):
902902
ctx.command = self
903903
ctx.extension = self.extension
904904

905+
self.listener.dispatch("on_command", ctx)
906+
905907
try:
906908
if self.extension:
907909
return await coro(self.extension, ctx, *args, **kwargs)

0 commit comments

Comments
 (0)