Skip to main content

Variable: ApplicationCommandRegistries

const ApplicationCommandRegistries: object

Type declaration

acquire()

acquire: (commandName: string) => ApplicationCommandRegistry

Acquires a registry for a command by its name.

Parameters

ParameterTypeDescription
commandNamestringThe name of the command.

Returns

ApplicationCommandRegistry

The application command registry for the command

getBulkOverwriteRetries()

getBulkOverwriteRetries: () => number

Returns

number

getDefaultBehaviorWhenNotIdentical()

getDefaultBehaviorWhenNotIdentical: () => RegisterBehavior

Returns

RegisterBehavior

getDefaultGuildIds()

getDefaultGuildIds: () => undefined | string[]

Returns

undefined | string[]

setBulkOverwriteRetries()

setBulkOverwriteRetries: (newAmountOfRetries: null | number) => void

Sets the amount of retries for when registering commands, only applies when defaultBehaviorWhenNotIdentical is set to RegisterBehavior.BulkOverwrite. This is used if registering the commands times out. The default value is 1, which means no retries are performed.

Parameters

ParameterTypeDescription
newAmountOfRetriesnull | numberThe new amount of retries to set. Set this to null to reset it to the default

Returns

void

setDefaultBehaviorWhenNotIdentical()

setDefaultBehaviorWhenNotIdentical: (behavior?: null | RegisterBehavior) => void

Sets the default behavior when registered commands aren't identical to provided data.

Parameters

ParameterTypeDescription
behavior?null | RegisterBehaviorThe default behavior to have. Set this to null to reset it to the default of RegisterBehavior.Overwrite.

Returns

void

setDefaultGuildIds()

setDefaultGuildIds: (guildIds?: null | string[]) => void

Sets the default guild ids for registering commands. This is used when a command is registered without providing guildIds in that command's own Command.registerApplicationCommands method.

Parameters

ParameterTypeDescription
guildIds?null | string[]The default guildIds to set. Set this to null to reset it to the default of undefined.

Returns

void

registries

Get Signature

get registries(): ReadonlyMap<string, ApplicationCommandRegistry>

Returns

ReadonlyMap<string, ApplicationCommandRegistry>

Defined in

projects/framework/src/index.ts:28