Skip to content

Commit dc1cf97

Browse files
authored
Dispatch an event on valid command
1 parent 66deebf commit dc1cf97

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

discord_slash/client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ async def on_socket_response(self, msg):
339339
if to_use["data"]["name"] in self.commands.keys():
340340
selected_cmd = self.commands[to_use["data"]["name"]]
341341
ctx = model.SlashContext(self.req, to_use, self._discord, self.logger)
342+
await self._discord.dispatch("slash_command", to_use["data"]["name"], selected_cmd)
342343
if selected_cmd["guild_ids"]:
343344
if ctx.guild.id not in selected_cmd["guild_ids"]:
344345
return

0 commit comments

Comments
 (0)