Registries behaviour
Can I override registries behaviour and register commands only in one guild? im moving from custom handler and don't want get guildId in every command
5 Replies
or push commands myself after ready event, if it's possible
There is no such option. But you can export a constant from somewhere and import it. Don't forget you're writing JavaScript/typescript and you have modules.
Not without a bunch of manual code and not using the sapphire registry. https://www.sapphirejs.dev/docs/Guide/commands/application-commands/application-command-registry/advanced/registering-application-commands-outside-a-command
Sapphire Framework
Registering Application Commands outside a Command | Sapphire
You are able to register your application commands inside of their command class, but also outside of the class! Whether
there is some get function in registry for full collection of commands or I can get it from SapphireClient?
if you want to register yourself you cannot use the register method on commands at all but personally I wouldnt say that's worth it for about 2 lines of code in every file.
You can also just register the commands globally and not set your bot to public on t he discord dashboard. That's by far the easiest.