Skip to content

Commit ececd61

Browse files
committed
Fixed subcommand tries to invoke as command
1 parent 36950f6 commit ececd61

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

discord_slash/client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,11 @@ async def on_socket_response(self, msg):
502502
if selected_cmd.has_subcommands and not selected_cmd.func:
503503
return await self.handle_subcommand(ctx, to_use)
504504

505+
if "options" in to_use["data"]:
506+
for x in to_use["data"]["options"]:
507+
if "value" not in x.keys():
508+
return await self.handle_subcommand(ctx, to_use)
509+
505510
args = await self.process_options(ctx.guild, to_use["data"]["options"], selected_cmd.auto_convert) \
506511
if "options" in to_use["data"] else []
507512

0 commit comments

Comments
 (0)