You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
So I'm trying to make it so I have one command that has multiple sub paths for doing different things. For example
/command config x
/command config y
/command admin z
What I would like to do is have each config command in its own class to help organize the code for example
class MyCommand(commands.Cog):
def init_.....
@commands.hybrid_group(name="commandx", description="", with_app_command=True)
async def commandx(self, ctx):
await ctx.send("Parent command!")
class MyCommandConfig(MyCommand):
def__init__...
@commandx.group(name="config", description="", with_app_command=True)
async def config(self, ctx):
...
Is there a way to do this? When I've tried I've gotten commandx is not defined.
Beta Was this translation helpful? Give feedback.
All reactions