Class: ApplicationCommandRegistry
Defined in: projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:31
Constructors
Constructor
new ApplicationCommandRegistry(
commandName:string):ApplicationCommandRegistry
Defined in: projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:90
Parameters
| Parameter | Type |
|---|---|
commandName | string |
Returns
ApplicationCommandRegistry
Properties
chatInputCommands
readonlychatInputCommands:Set<string>
Defined in: projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:41
A set of all chat input command names and ids that point to this registry. You should not use this field directly, but instead use ApplicationCommandRegistry.globalChatInputCommandIds
commandName
readonlycommandName:string
Defined in: projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:35
The piece this registry is for.
contextMenuCommands
readonlycontextMenuCommands:Set<string>
Defined in: projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:47
A set of all context menu command names and ids that point to this registry. You should not use this field directly, but instead use ApplicationCommandRegistry.globalContextMenuCommandIds
globalChatInputCommandIds
readonlyglobalChatInputCommandIds:Set<string>
Defined in: projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:64
A set of all registered and valid global chat input command ids that point to this registry.
globalCommandId
globalCommandId:
null|string=null
Defined in: projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:59
The global slash command id for this command.
Deprecated
This field will only show the first global command id registered for this registry. Use ApplicationCommandRegistry.globalChatInputCommandIds instead.
globalContextMenuCommandIds
readonlyglobalContextMenuCommandIds:Set<string>
Defined in: projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:69
A set of all registered and valid global context menu command ids that point to this registry.
guildCommandIds
readonlyguildCommandIds:Collection<string,string>
Defined in: projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:76
The guild command ids for this command.
Deprecated
This field will only show the first guild command id registered for this registry per guild. Use ApplicationCommandRegistry.guildIdToChatInputCommandIds and ApplicationCommandRegistry.guildIdToContextMenuCommandIds instead.
guildIdsToFetch
readonlyguildIdsToFetch:Set<string>
Defined in: projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:52
The guild ids that we need to fetch the commands for.
guildIdToChatInputCommandIds
readonlyguildIdToChatInputCommandIds:Collection<string,Set<string>>
Defined in: projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:81
A map of guild ids to a set of registered and valid chat input command ids that point to this registry.
guildIdToContextMenuCommandIds
readonlyguildIdToContextMenuCommandIds:Collection<string,Set<string>>
Defined in: projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:86
A map of guild ids to a set of registered and valid context menu command ids that point to this registry.
Accessors
command
Get Signature
get command():
undefined|Command<Args,CommandOptions>
Defined in: projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:94
Returns
undefined | Command<Args, CommandOptions>
Methods
addChatInputCommandIds()
addChatInputCommandIds(...
commandIds:string[] |string[][]):ApplicationCommandRegistry
Defined in: projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:206
Parameters
| Parameter | Type |
|---|---|
...commandIds | string[] | string[][] |
Returns
ApplicationCommandRegistry
addChatInputCommandNames()
addChatInputCommandNames(...
names:string[] |string[][]):ApplicationCommandRegistry
Defined in: projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:176
Parameters
| Parameter | Type |
|---|---|
...names | string[] | string[][] |
Returns
ApplicationCommandRegistry
addContextMenuCommandIds()
addContextMenuCommandIds(...
commandIds:string[] |string[][]):ApplicationCommandRegistry
Defined in: projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:227
Parameters
| Parameter | Type |
|---|---|
...commandIds | string[] | string[][] |
Returns
ApplicationCommandRegistry
addContextMenuCommandNames()
addContextMenuCommandNames(...
names:string[] |string[][]):ApplicationCommandRegistry
Defined in: projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:191
Parameters
| Parameter | Type |
|---|---|
...names | string[] | string[][] |
Returns
ApplicationCommandRegistry
handleIdAddition()
protectedhandleIdAddition(type:InternalRegistryAPIType,id:string,guildId?:null|string):void
Defined in: projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:284
Parameters
| Parameter | Type |
|---|---|
type | InternalRegistryAPIType |
id | string |
guildId? | null | string |
Returns
void
registerChatInputCommand()
registerChatInputCommand(
command:SlashCommandBuilder|SlashCommandOptionsOnlyBuilder|SlashCommandSubcommandsOnlyBuilder|ChatInputApplicationCommandData|Omit<SlashCommandBuilder,"addSubcommand"|"addSubcommandGroup"> | (builder:SlashCommandBuilder) =>unknown,options?:RegisterOptions):ApplicationCommandRegistry
Defined in: projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:98
Parameters
| Parameter | Type |
|---|---|
command | SlashCommandBuilder | SlashCommandOptionsOnlyBuilder | SlashCommandSubcommandsOnlyBuilder | ChatInputApplicationCommandData | Omit<SlashCommandBuilder, "addSubcommand" | "addSubcommandGroup"> | (builder: SlashCommandBuilder) => unknown |
options? | RegisterOptions |
Returns
ApplicationCommandRegistry
registerContextMenuCommand()
registerContextMenuCommand(
command:ContextMenuCommandBuilder|UserApplicationCommandData|MessageApplicationCommandData| (builder:ContextMenuCommandBuilder) =>unknown,options?:RegisterOptions):ApplicationCommandRegistry
Defined in: projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:138
Parameters
| Parameter | Type |
|---|---|
command | ContextMenuCommandBuilder | UserApplicationCommandData | MessageApplicationCommandData | (builder: ContextMenuCommandBuilder) => unknown |
options? | RegisterOptions |
Returns
ApplicationCommandRegistry
runAPICalls()
protectedrunAPICalls(applicationCommands:ApplicationCommandManager,globalCommands:Collection<string,ApplicationCommand<{ }>>,guildCommands:Map<string,Collection<string,ApplicationCommand<{ }>>>):Promise<void>
Defined in: projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:248
Parameters
| Parameter | Type |
|---|---|
applicationCommands | ApplicationCommandManager |
globalCommands | Collection<string, ApplicationCommand<{ }>> |
guildCommands | Map<string, Collection<string, ApplicationCommand<{ }>>> |
Returns
Promise<void>