Skip to content

Commit d97f5a5

Browse files
committed
Fixed subcommand call args break if prefix includes space
1 parent 4aac8ce commit d97f5a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dico_command/command.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async def invoke(self, ctx: Context, *args, **kwargs):
8282
raise InvalidArgument("invalid argument data.")
8383
if subcommand_invoking:
8484
ctx.subcommand_name = subcommand_name
85-
msg = ctx.content
85+
msg = ctx.content[len(ctx.prefix):]
8686
ipt = msg.split(maxsplit=1)
8787
ipt = ipt[1].split(maxsplit=1) if len(ipt) > 1 else []
8888
args, kwargs = smart_split(ipt[1] if len(ipt) > 1 else "", subcommand.args_data, subcommand=bool(subcommand.subcommands))

0 commit comments

Comments
 (0)