Getting the client to log a list of registered commands and if they are global

I was just wondering if there was a way, once the ApplicationCommandRegistry finished initialising, I could get the registered command data?
Solution:
client.application.commands, discordjs code
Jump to solution
8 Replies
JcbSm
JcbSmOP2y ago
Also is there part of the guide which explains how to properly delete commands from the application if they are no longer present?
Solution
Favna
Favna2y ago
client.application.commands, discordjs code
Favna
Favna2y ago
and likewise deleting is through discordjs code as well so reference the discordjs guide
JcbSm
JcbSmOP2y ago
Lovely, thankyou Is there an event that's emitted once the registry is initialised?
Favna
Favna2y ago
there isnt but if you can make a small pull request for that, that would be great. it would have to be the last line in this function: https://github.com/sapphiredev/framework/blob/main/src/lib/utils/application-commands/ApplicationCommandRegistries.ts#L43 Events.CommandApplicationCommandRegistryFinished = "commandApplicationCommandRegistryFinished" it should also be noted that we have a nearly finished PR where we add a BulkOverwrite registry behaviour which when set will always delete all commands and set all commands from pieces by using the bulk overwrite endpoint on the discord api that means you'll never have old commands you will also no longer need to (or can) track idHints if all you care about set it and forget it then that will work for you too
JcbSm
JcbSmOP2y ago
I've never made a PR before, I'd love to learn how to, but I don't want to make peoples life more difficult by doing it completely wrong. What's the best way to learn? Looking at previous ones?
24
242y ago
Make your first PR :) Look at sapphires contributing guidelines and of course past PRs
Favna
Favna2y ago
only one way to learn and that is to just do and if it's wrong then we'll let you know
Want results from more Discord servers?
Add your server