Clear Command Cache?

Since the other one removed his message... How to clear the cache using Sapphire?
Solution:
You should set add this line to your index file before you log in, which will overwrite all commands each time. ```ts import { SapphireClient, container, ApplicationCommandRegistries, RegisterBehavior } from '@sapphire/framework'; ApplicationCommandRegistries.setDefaultBehaviorWhenNotIdentical(RegisterBehavior.BulkOverwrite);...
Jump to solution
6 Replies
Favna
Favna11mo ago
Why... Would you want to do that? We only use the cache to know which commands exist. If you clear it then you can't run commands anymore.
Jarvo
JarvoOP11mo ago
Because it’s bugged… I have to clear it to remove commands the bot registered, but don’t exist…
Solution
Lioness100
Lioness10011mo ago
You should set add this line to your index file before you log in, which will overwrite all commands each time.
import { SapphireClient, container, ApplicationCommandRegistries, RegisterBehavior } from '@sapphire/framework';

ApplicationCommandRegistries.setDefaultBehaviorWhenNotIdentical(RegisterBehavior.BulkOverwrite);
import { SapphireClient, container, ApplicationCommandRegistries, RegisterBehavior } from '@sapphire/framework';

ApplicationCommandRegistries.setDefaultBehaviorWhenNotIdentical(RegisterBehavior.BulkOverwrite);
Jarvo
JarvoOP11mo ago
Thanks This only removes the commands that do not exist, right?
Lioness100
Lioness10011mo ago
It overwrites all of your commands with the latest data
Jarvo
JarvoOP11mo ago
Okay. Good Thanks 🙂
Want results from more Discord servers?
Add your server