Configuring the global behavior when commands are not identical
Configuring the global behavior is easy! You just need to import the
[ApplicationCommandRegistries
][application-command-registries] object from @sapphire/framework
and call the
setDefaultBehaviorWhenNotIdentical
method with the new desired default behavior. For example, to override the behavior
to only log differences by default, you may write:
- JavaScript
- ESM
- TypeScript
const { RegisterBehavior } = require('@sapphire/framework');ApplicationCommandRegistries.setDefaultBehaviorWhenNotIdentical(RegisterBehavior.LogToConsole);
import { RegisterBehavior } from '@sapphire/framework';ApplicationCommandRegistries.setDefaultBehaviorWhenNotIdentical(RegisterBehavior.LogToConsole);
import { RegisterBehavior } from '@sapphire/framework';ApplicationCommandRegistries.setDefaultBehaviorWhenNotIdentical(RegisterBehavior.LogToConsole);