DynamicGuildContextCommandHandler
Class: DynamicGuildContextCommandHandler<Context>
Section titled “Class: DynamicGuildContextCommandHandler<Context>”Defined in: handlers/DynamicContextCommandHandler.ts:44
Fallback handler for guild-scoped user/message context commands whose name isn’t known
ahead of time (e.g. per-guild custom commands), or that don’t match any registered
ContextCommandHandler.
When an invocation has a guild_id, this handler is tried before DynamicGlobalContextCommandHandler.
Only one instance may be registered per Honocord instance via loadHandlers.
Extends
Section titled “Extends”DynamicContextCommandHandlerBase<Context>
Type Parameters
Section titled “Type Parameters”Context
Section titled “Context”Context extends BaseInteractionContext = BaseInteractionContext
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DynamicGuildContextCommandHandler<
Context>():DynamicGuildContextCommandHandler<Context>
Returns
Section titled “Returns”DynamicGuildContextCommandHandler<Context>
Inherited from
Section titled “Inherited from”DynamicContextCommandHandlerBase<Context>.constructor
Properties
Section titled “Properties”handlerType
Section titled “handlerType”
readonlyhandlerType:"dynamic-context"="dynamic-context"
Defined in: handlers/DynamicContextCommandHandler.ts:11
Inherited from
Section titled “Inherited from”DynamicContextCommandHandlerBase.handlerType
readonlyscope:"guild"
Defined in: handlers/DynamicContextCommandHandler.ts:47
Overrides
Section titled “Overrides”DynamicContextCommandHandlerBase.scope
Methods
Section titled “Methods”addHandler()
Section titled “addHandler()”addHandler(
handler):this
Defined in: handlers/DynamicContextCommandHandler.ts:20
Adds the command handler function.
Parameters
Section titled “Parameters”handler
Section titled “handler”(interaction) => any
The function to handle the context command interaction. Receives both
User and Message context interactions — narrow with interaction.isOfType(...).
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”DynamicContextCommandHandlerBase.addHandler
execute()
Section titled “execute()”execute(
interaction):Promise<void>
Defined in: handlers/DynamicContextCommandHandler.ts:28
Executes the command handler
Parameters
Section titled “Parameters”interaction
Section titled “interaction”DynamicContextInteraction<Context>
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”DynamicContextCommandHandlerBase.execute
