#Question about Subcommands

1 messages · Page 1 of 1 (latest)

sly adder
#

is there any way to use the original command?

@slash_command(...)
async def command(...):

@command.subcommand(...):
async def subcommand(...)

as in /command as well as /command subcommand?

midnight capeBOT
#

Hey! Once your issue is solved, press the button below to close this thread!

tardy nimbus
#

@sly adder do you mean so you’d be using
/example - example command
**/example sub command ** - example sub command

sly adder
#

it's not that important, it would just look asthetically pleasing, but yeah

tardy nimbus
#

Yeah you can

#

You’d just do this

#
@slash_command…
async def…:
Placeholder 

Is what it usually looks like

#

You’d just replace the placeholder with the code you wanna be there for your command