Configuring the global behavior when commands are not identical
Configuring the global behavior is easy! You just need to import the
ApplicationCommandRegistries
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:
- CommonJS
- 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);