Skip to content

Commit 87e21cc

Browse files
authored
Define subcommand_name
1 parent 97edea0 commit 87e21cc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

discord_slash/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,8 @@ async def handle_subcommand(self, ctx: context.SlashContext, data: dict):
764764
sub_name = sub["name"]
765765
if sub_name not in base:
766766
return
767-
ctx.subcommand = sub_name
767+
if sub_name is not None:
768+
ctx.subcommand_name = sub_name
768769
sub_opts = sub["options"] if "options" in sub else []
769770
for x in sub_opts:
770771
if "options" in x or "value" not in x:

0 commit comments

Comments
 (0)