Pattern for fetching all registered slash commands

I have some slash commands and some with subcommands and and want to introduce a /help slash command that shows all the available guild commands and their description? I want to get the names and descriptions for all the slash commands. I realize I can use the raw discord client to fetch that registered commands and parse then use that. However, I'm trying to see if it's possible to avoid making those additional network calls. Thanks.
Solution:
You can get all your command classes from the commands store. Thats accessed using client.stores.get('commands')
Solution
B
Ben418d ago
You can get all your command classes from the commands store. Thats accessed using client.stores.get('commands')
F
Favna418d ago
why would you need this though. People can just type /<bot name> to get the list. For example if you type /teryl you get all Teryl commands, if you type /spinel you get all Spinel commands. These are native Discord features. There is hardly ever a need for a help command when you use slash commands.
D
Doob418d ago
@Favna I now agree. In doing this, I was fighting the intended pattern for slash commands. I was trying to provide parity with chat commands but in do so I'm not respecting how slash commands should work. FWIW, @Ben855 's suggestion worked as I expected except for with the SubCommand type where I was unable to access the description of sub-commands.
Want results from more Discord servers?
Add your server
More Posts
interaction.showModal not workinginteraction.showModal doesnt work, I dont know why. Code: ``` this.container.logger.debug("Start EdPrecondition with Slash CommandHow to report precondition failure w/ clash command? If I use `this.error({ message: 'error' });` iHow to use skyra env utilities with the cli generated project?I want to use env variables to store my mongo uri, but due to skyra utilities being their i cant useHow to get the current channel a slash command was used inI took a look at the following post https://discord.com/channels/737141877803057244/1061609301556346Preventing Commands in DMsHow do you prevent commands from being used in DMs? Message commands.autoModerationActionExecution EventDoes Sapphire not emit the Discord.js `autoModerationActionExecution` event? The following code doeHelp canceling a commandHere the code I have for a simple reminder command.https://pastebin.com/crRSdjEn. It works but id liHow to check if the bot has Permission X inside of the server? For example VIEW_AUDIT_LOGIn a listenerWhat parameter do I pass to the run method in my GuildCreate listener?Problem with this.container.stores.get().get();Code:InteractionCreate fileCan I easily create a listener for `interactionCreate`? I need it for some UI Abilities, and I am noHow to Create Threads?I dont get how to create threads programmatically. Please helpCommand infodoes sapphire have a built in command info funtions so we can get for example the aliases of a commaargs.pick("member")using `args.pick("member")`, is it intended to get the member even if you just provide 1 letter of t