Make commands register when i run a command like `!sync`

Hi, I used the CLI to generate a project and noticed it syncs everytime a file changes. I have autosave enabled so this will get ratelimited pretty fast. Is there a way to make it sync slash commands when I run a command (and automatically use all the registerApplicationCommands )? Also wondering if there's a way to make all commands "guild" commands instead of having to give guildIds every time I register
Solution:
Sapphire offers no built-in commands but you can leverage https://www.sapphirejs.dev/docs/Guide/commands/application-commands/application-command-registry/advanced/registering-application-commands-outside-a-command to implement a system like that yourself. As for guildIds, you can just do ```ts // somewhere...
Jump to solution
1 Reply
Solution
Favna
Favna2y ago
Sapphire offers no built-in commands but you can leverage https://www.sapphirejs.dev/docs/Guide/commands/application-commands/application-command-registry/advanced/registering-application-commands-outside-a-command to implement a system like that yourself. As for guildIds, you can just do
// somewhere
export guildIds = ['myid'];

// in registry
import { guildIds } from 'somewhere';

//...
guilIds: guildIds
// somewhere
export guildIds = ['myid'];

// in registry
import { guildIds } from 'somewhere';

//...
guilIds: guildIds
Want results from more Discord servers?
Add your server