Handle Subcommands in SubcommandGroups
Hello,
I'm working with SubcommandGroups atm and I'm trying to figure out how I can handle SubcommandGoups aswell.
The issue is that I'm loading my commands and Subcommands into collections as every bot tutorial tells you to.
Now I have
client.slashCommands
and client.subcommands
as collections for my commands. Now, how do I properly manage subcommandgroups in there as well so that it's still clear to what subcommand they belong?
Does it make sense to store them as an object? Like
4 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Yeah, I watched a video and he did it like that. That's why I changed it in the code I put there but I don't know if it's good. I generally have the feeling that especially this part of my code is a huge pile of sh!t
That's everything I found. Every tutorial I watched or read that I can remember had it that way. I don't really know how to do it better, that's why I came here
Do you have some resources that tell me how to that best?
But the tutorial stored them in different collections. I'm constantly trying to come up with something but it always results in my wanting to nest collections and struggling on how to refer from the "lower level" to the "higher level"...
I don't know what different layout I should use. I looked up a couple more tutorials now and all of them create different collections for their main commands and subcommands
This is a crappy solution I came up with now. Does it look somewhat acceptable?
Already had that in mind and I could add a subcommand property where I throw them in, but I mean the general thought of storing and nesting them in an object like this. Is this good to do or does it come with issues? So far it solves my problem