Skip to main content

Class: ApplicationCommandRegistry

Constructors​

constructor​

β€’ new ApplicationCommandRegistry(commandName)

Parameters​

NameType
commandNamestring

Defined in​

projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:35

Properties​

apiCalls​

β€’ Private Readonly apiCalls: InternalAPICall[] = []

Defined in​

projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:33


chatInputCommands​

β€’ Readonly chatInputCommands: Set<string>

Defined in​

projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:30


commandName​

β€’ Readonly commandName: string

Defined in​

projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:28


contextMenuCommands​

β€’ Readonly contextMenuCommands: Set<string>

Defined in​

projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:31

Accessors​

command​

β€’ get command(): undefined | Command<Args, CommandOptions>

Returns​

undefined | Command<Args, CommandOptions>

Defined in​

projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:39

Methods​

addChatInputCommandIds​

β–Έ addChatInputCommandIds(...commandIds): ApplicationCommandRegistry

Parameters​

NameType
...commandIdsstring[] | string[][]

Returns​

ApplicationCommandRegistry

Defined in​

projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:135


addChatInputCommandNames​

β–Έ addChatInputCommandNames(...names): ApplicationCommandRegistry

Parameters​

NameType
...namesstring[] | string[][]

Returns​

ApplicationCommandRegistry

Defined in​

projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:105


addContextMenuCommandIds​

β–Έ addContextMenuCommandIds(...commandIds): ApplicationCommandRegistry

Parameters​

NameType
...commandIdsstring[] | string[][]

Returns​

ApplicationCommandRegistry

Defined in​

projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:156


addContextMenuCommandNames​

β–Έ addContextMenuCommandNames(...names): ApplicationCommandRegistry

Parameters​

NameType
...namesstring[] | string[][]

Returns​

ApplicationCommandRegistry

Defined in​

projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:120


createMissingCommand​

β–Έ Private createMissingCommand(commandsManager, apiData, type, guildId?): Promise<void>

Parameters​

NameType
commandsManagerApplicationCommandManager<ApplicationCommand<{ guild: GuildResolvable }>, { guild: GuildResolvable }, null>
apiDataRESTPostAPIChatInputApplicationCommandsJSONBody | RESTPostAPIContextMenuApplicationCommandsJSONBody
typestring
guildId?string

Returns​

Promise<void>

Defined in​

projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:377


debug​

β–Έ Private debug(message, ...other): void

Parameters​

NameType
messagestring
...otherunknown[]

Returns​

void

Defined in​

projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:424


error​

β–Έ Private error(message, ...other): void

Parameters​

NameType
messagestring
...otherunknown[]

Returns​

void

Defined in​

projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:416


handleAPICall​

β–Έ Private handleAPICall(commandsManager, globalCommands, allGuildsCommands, apiCall): Promise<void>

Parameters​

NameType
commandsManagerApplicationCommandManager<ApplicationCommand<{ guild: GuildResolvable }>, { guild: GuildResolvable }, null>
globalCommandsCollection<string, ApplicationCommand<{}>>
allGuildsCommandsMap<string, Collection<string, ApplicationCommand<{}>>>
apiCallInternalAPICall

Returns​

Promise<void>

Defined in​

projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:199


handleCommandPresent​

β–Έ Private handleCommandPresent(applicationCommand, apiData, behaviorIfNotEqual, guildId?): Promise<void>

Parameters​

NameType
applicationCommandApplicationCommand<{}>
apiDataRESTPostAPIChatInputApplicationCommandsJSONBody | RESTPostAPIContextMenuApplicationCommandsJSONBody
behaviorIfNotEqualRegisterBehavior
guildId?string

Returns​

Promise<void>

Defined in​

projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:317


info​

β–Έ Private info(message, ...other): void

Parameters​

NameType
messagestring
...otherunknown[]

Returns​

void

Defined in​

projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:412


logCommandDifferences​

β–Έ Private logCommandDifferences(differences, applicationCommand, logAsWarn): void

Parameters​

NameType
differencesCommandDifference[]
applicationCommandApplicationCommand<{}>
logAsWarnboolean

Returns​

void

Defined in​

projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:357


registerChatInputCommand​

β–Έ registerChatInputCommand(command, options?): ApplicationCommandRegistry

Parameters​

NameType
commandChatInputApplicationCommandData | SlashCommandBuilder | SlashCommandSubcommandsOnlyBuilder | SlashCommandOptionsOnlyBuilder | Omit<SlashCommandBuilder, "addSubcommand" | "addSubcommandGroup"> | (builder: SlashCommandBuilder) => SlashCommandBuilder | SlashCommandSubcommandsOnlyBuilder | SlashCommandOptionsOnlyBuilder | Omit<SlashCommandBuilder, "addSubcommand" | "addSubcommandGroup">
options?RegisterOptions

Returns​

ApplicationCommandRegistry

Defined in​

projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:43


registerContextMenuCommand​

β–Έ registerContextMenuCommand(command, options?): ApplicationCommandRegistry

Parameters​

NameType
commandUserApplicationCommandData | MessageApplicationCommandData | ContextMenuCommandBuilder | (builder: ContextMenuCommandBuilder) => ContextMenuCommandBuilder
options?RegisterOptions

Returns​

ApplicationCommandRegistry

Defined in​

projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:78


runAPICalls​

β–Έ Protected runAPICalls(applicationCommands, globalCommands, guildCommands): Promise<void>

Parameters​

NameType
applicationCommandsApplicationCommandManager<ApplicationCommand<{ guild: GuildResolvable }>, { guild: GuildResolvable }, null>
globalCommandsCollection<string, ApplicationCommand<{}>>
guildCommandsMap<string, Collection<string, ApplicationCommand<{}>>>

Returns​

Promise<void>

Defined in​

projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:177


warn​

β–Έ Private warn(message, ...other): void

Parameters​

NameType
messagestring
...otherunknown[]

Returns​

void

Defined in​

projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:420