ThatGuyJamal - Is it possible to make a default va...

Is it possible to make a default value for registering command meta data. Like:
guildIds: isCanaryMode ? InternalContainer.ENV.GUILDS_TO_REGISTER : undefined,
registerCommandIfMissing: InternalContainer.ENV.REGISTER_COMMANDS,
behaviorWhenNotIdentical: RegisterBehavior.Overwrite,
idHints: ['1017435653555888180']
guildIds: isCanaryMode ? InternalContainer.ENV.GUILDS_TO_REGISTER : undefined,
registerCommandIfMissing: InternalContainer.ENV.REGISTER_COMMANDS,
behaviorWhenNotIdentical: RegisterBehavior.Overwrite,
idHints: ['1017435653555888180']
i have to put this on every command which I find annoying.
2 Replies
Favna
Favna3y ago
make a function that returns it then call the function also behaviorWhenNotIdentical: RegisterBehavior.Overwrite, is the default and registerCommandIfMissing defaults to true and I don't really see any situation why you'd want that false
FC
FC3y ago
Sapphire Framework
Configuring the global behavior when commands are not identical | S...
Configuring the global behavior is easy! You just need to import the
Want results from more Discord servers?
Add your server