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
Favna12mo 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
JarvoOP12mo ago
Because it’s bugged… I have to clear it to remove commands the bot registered, but don’t exist…
Solution
Lioness100
Lioness10012mo 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
JarvoOP12mo ago
Thanks This only removes the commands that do not exist, right?
Lioness100
Lioness10012mo ago
It overwrites all of your commands with the latest data
Jarvo
JarvoOP12mo ago
Okay. Good Thanks 🙂
Want results from more Discord servers?
Add your server