From 1a99f69a6641025347bfdbb61cf3571a64429047 Mon Sep 17 00:00:00 2001 From: Foxstar <50710829+dennis0324@users.noreply.github.com> Date: Tue, 26 Apr 2022 00:32:52 +0900 Subject: [PATCH] changing sub commands example code part of sub commands make trouble in python 3.10 above the error occur TypeError: run..cmd() missing 1 required positional argument: 'second_option' --- docs/quickstart.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 500eb94af..afe7ddf04 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -208,7 +208,7 @@ Nested commands: subcommands ), ], ) - async def cmd(ctx: interactions.CommandContext, sub_command: str, second_option: str, option: int = None): + async def cmd(ctx: interactions.CommandContext, sub_command: str, second_option: str = "", option: int = None): if sub_command == "command_name": await ctx.send(f"You selected the command_name sub command and put in {option}") elif sub_command == "second_command":