DynamicGlobalSlashCommandHandler
Class: DynamicGlobalSlashCommandHandler<Context>
Section titled “Class: DynamicGlobalSlashCommandHandler<Context>”Defined in: handlers/DynamicSlashCommandHandler.ts:72
Fallback handler for global slash commands whose name isn’t known ahead of time, or that
don’t match any registered SlashCommandHandler. Also catches unmatched guild-scoped
invocations when no DynamicGuildSlashCommandHandler is registered.
Only one instance may be registered per Honocord instance via loadHandlers.
Extends
Section titled “Extends”DynamicSlashCommandHandlerBase<Context>
Type Parameters
Section titled “Type Parameters”Context
Section titled “Context”Context extends BaseInteractionContext = BaseInteractionContext
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DynamicGlobalSlashCommandHandler<
Context>():DynamicGlobalSlashCommandHandler<Context>
Returns
Section titled “Returns”DynamicGlobalSlashCommandHandler<Context>
Inherited from
Section titled “Inherited from”DynamicSlashCommandHandlerBase<Context>.constructor
Properties
Section titled “Properties”handlerType
Section titled “handlerType”
readonlyhandlerType:"dynamic-slash"="dynamic-slash"
Defined in: handlers/DynamicSlashCommandHandler.ts:7
Inherited from
Section titled “Inherited from”DynamicSlashCommandHandlerBase.handlerType
readonlyscope:"global"
Defined in: handlers/DynamicSlashCommandHandler.ts:75
Overrides
Section titled “Overrides”DynamicSlashCommandHandlerBase.scope
Methods
Section titled “Methods”addAutocompleteHandler()
Section titled “addAutocompleteHandler()”addAutocompleteHandler(
handler):this
Defined in: handlers/DynamicSlashCommandHandler.ts:26
Adds the autocomplete handler function.
Parameters
Section titled “Parameters”handler
Section titled “handler”(interaction) => any
The function to handle the autocomplete interaction
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”DynamicSlashCommandHandlerBase.addAutocompleteHandler
addHandler()
Section titled “addHandler()”addHandler(
handler):this
Defined in: handlers/DynamicSlashCommandHandler.ts:16
Adds the command handler function.
Parameters
Section titled “Parameters”handler
Section titled “handler”(interaction) => any
The function to handle the command interaction
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”DynamicSlashCommandHandlerBase.addHandler
execute()
Section titled “execute()”execute(
interaction):Promise<void>
Defined in: handlers/DynamicSlashCommandHandler.ts:34
Executes the command handler
Parameters
Section titled “Parameters”interaction
Section titled “interaction”ChatInputCommandInteraction<Context>
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”DynamicSlashCommandHandlerBase.execute
executeAutocomplete()
Section titled “executeAutocomplete()”executeAutocomplete(
interaction):Promise<void>
Defined in: handlers/DynamicSlashCommandHandler.ts:44
Executes the autocomplete handler if it exists
Parameters
Section titled “Parameters”interaction
Section titled “interaction”AutocompleteInteraction<Context>
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”DynamicSlashCommandHandlerBase.executeAutocomplete
