Bulk upgrade commands to remove unregistered ones

Hellow How we bulk update commands (slash but also contectuals) with sapphire ? or in more general deleting unregeistered commands ? i tried register behavior as BULK_OVERWRITE but i didn't work
Solution:
ok mb environment issue, idk why docker wasn't rebuild image
Jump to solution
4 Replies
secre
secre4mo ago
iirc this only works if you specify guild id. if you want to setup app commands (global) you need to first remove them all and then update with current state at least that's how I done so...
Favna
Favna4mo ago
Setting the global registry behaviour to bulk overwrite will work, share code of what you tried. To unregister use the DiscordJS methods: client.application.commands https://discord.js.org/docs/packages/discord.js/14.15.3/ApplicationCommandManager:Class
WeeskyBDW
WeeskyBDWOP4mo ago
i did ApplicationCommandRegistries.setDefaultBehaviorWhenNotIdentical(RegisterBehavior.BulkOverwrite); in https://github.com/Skript-MC/Swan/blob/dev/src/structures/commands/SwanCommand.ts (it's a contribution to a french open-source bot) below REGISTRY_OPTIONS
GitHub
Swan/src/structures/commands/SwanCommand.ts at dev · Skript-MC/Swan
Bot du discord Skript-MC. Contribute to Skript-MC/Swan development by creating an account on GitHub.
Solution
WeeskyBDW
WeeskyBDW4mo ago
ok mb environment issue, idk why docker wasn't rebuild image
Want results from more Discord servers?
Add your server