Children of Slash Command does not show up if the Command it self is a child of another command
ZeyoYT opened this issue · comments
Issue Checklist
- I have checked for similar issues on the Issue tracker
- I have updated to the latest version of JDA-Chewtils.
- I have checked the branches or the maintainer's PRs for upcoming bug fixes.
Affected Modules
Command
Description
Issue :-
I Recently was trying out a system in my bot that is made for server mods
i have a command(child) which has 3 children commands with options, i have another command called server(parent) which contains sub commands for all server related commands, the parent command showed child command but none of the child's children commands
how to reproduce :-
- Make 3 slash commands ( X, Y and Z )
- Add Z as a child command of Y using children
- Add Y as a child command of X using children
- Add X command to Bot and also add Y command to Bot
outcome :-
X Command has Y but not Z
Y Command has Z Command
This seems like a fundamental misunderstanding of how Discord slash commands work.
Parents cannot be executed if they have children, so what you're experiencing is intended behavior. The closest you can get here is making X command have a group called A, and have Z be a child of A, so X has A (who has Z) and Y, 2 children, 3 layers, as you're seemingly wanting.
Can you describe your use case? I can probably help get you to what you're wanting.
oh i see my bad, i am working on a reaction role system, in my bot i have a sub command called server which has other server realted slash command, like auto role, ticket system etc, all of this commands dont have a child they work directly by showing select menu , but when i made the reaction role command which has 3 children, 1. set, 2. add role, 3.disable
while i can just skip adding reaction role as a child of server command, it would great if it was under server command as all of server realted commands are inside it
i might aswell just remove the server command as its not future proof
Yeah, and it'd mess with your permissions as well. You could easily add a /help
and auto-complete (or uses Choices) all of your commands to describe them as well. Glad I could help you :)