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?
8 Replies
Also is there part of the guide which explains how to properly delete commands from the application if they are no longer present?
Solution
client.application.commands
, discordjs codeand likewise deleting is through discordjs code as well so reference the discordjs guide
Lovely, thankyou
Is there an event that's emitted once the registry is initialised?
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 tooI'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?
Make your first PR :)
Look at sapphires contributing guidelines and of course past PRs
only one way to learn and that is to just do
and if it's wrong then we'll let you know