Skip to content

Commit 99d40f4

Browse files
committed
Some minor fix to #22
1 parent 5ba5058 commit 99d40f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

discord_slash/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ async def on_socket_response(self, msg):
346346
return await self.handle_subcommand(ctx, to_use)
347347
args = await self.process_options(ctx.guild, to_use["data"]["options"], selected_cmd["auto_convert"]) \
348348
if "options" in to_use["data"] else []
349-
await self._discord.dispatch("slash_command", to_use["data"]["name"], selected_cmd)
349+
self._discord.dispatch("slash_command", to_use["data"]["name"], selected_cmd, ctx)
350350
await selected_cmd["func"](ctx, *args)
351351

352352
async def handle_subcommand(self, ctx: model.SlashContext, data: dict):
@@ -375,11 +375,11 @@ async def handle_subcommand(self, ctx: model.SlashContext, data: dict):
375375
selected = base[sub_name][sub_group]
376376
args = await self.process_options(ctx.guild, x["options"], selected["auto_convert"]) \
377377
if "options" in x.keys() else []
378-
await self._discord.dispatch("slash_command", sub_name, selected)
378+
self._discord.dispatch("slash_command", f"{data['data']['name']} {sub_name} {sub_group}", selected, ctx)
379379
await selected["func"](ctx, *args)
380380
return
381381
selected = base[sub_name]
382382
args = await self.process_options(ctx.guild, sub_opts, selected["auto_convert"]) \
383383
if "options" in sub.keys() else []
384-
await self._discord.dispatch("slash_command", sub_name, selected)
384+
self._discord.dispatch("slash_command", f"{data['data']['name']} {sub_name}", selected, ctx)
385385
await selected["func"](ctx, *args)

0 commit comments

Comments
 (0)