changing sub commands example code
part of sub commands make trouble in python 3.10 above the error occur
TypeError: run.<locals>.cmd() missing 1 required positional argument: 'second_option'
@@ -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":
