Subcommands, and CommandGroups/SubCommandGroups

Hey!, I was wondering whether it's possible to create subcommands and groups with sapphire i.e ?automod enable -> enable is part of the automod command group ?automod ignore reset -> ignore is part of the automod command group and reset is part of ignore subcommand group Is it possible to replicate something like this?
8 Replies
Favna
Favna15mo ago
Sapphire Framework
Getting Started | Sapphire
Introduction
Xeno™
Xeno™OP15mo ago
Thanks a lot!, Also another question how are they stored in the "stores" are they seperate commands or do they belong to a single group
Favna
Favna15mo ago
they are stored alongside the parent command as properties on the class.
Xeno™
Xeno™OP15mo ago
Oh okay that's good to hear, and is prompts possible with sapphire? not argument prompting, i mean it during when the command is in action
Favna
Favna15mo ago
That is largely just a DJS feature but we do have a MessagePrompter class to safe on a lot of the boiletplating: https://www.sapphirejs.dev/docs/Documentation/api-utilities/classes/sapphire_discord_js_utilities.MessagePrompter
Sapphire Framework
Class: MessagePrompter | Sapphire
@sapphire/discord.js-utilities.MessagePrompter
Xeno™
Xeno™OP15mo ago
Alright thanks, again <3
Xeno™
Xeno™OP15mo ago
Last question, i prolly disturbed you a lot. Is it not possible to have same features as the Command.Options in subcommand mapping array? such as attributes like description, aliases and etc
Favna
Favna15mo ago
The description field in options is meant for help commands. If you want descriptions for slash commands read our guide on registering commands. Subcommand aliases are by providing different input with the same output. You can also chuck anything in detailedDescription, see https://www.sapphirejs.dev/docs/Guide/commands/command-options#detaileddescription Can't stress enough to consult the guide.
Sapphire Framework
Command Options | Sapphire
On this page we will cover the different options you can use when creating a [command]. For each option we will cover
Want results from more Discord servers?
Add your server