import { SuggestionRouter } from "https://deno.land/x/deno_slack_sdk@2.4.1/functions/interactivity/block_suggestion_router.ts";
Constructors
new
SuggestionRouter(func: SlackFunctionDefinition<InputParameters, OutputParameters, RequiredInput, RequiredOutput>)Type Parameters
InputParameters extends ParameterSetDefinition
OutputParameters extends ParameterSetDefinition
RequiredInput extends PossibleParameterKeys<InputParameters>
RequiredOutput extends PossibleParameterKeys<OutputParameters>
Properties
private
routes: Array<[BlockActionConstraint, BlockSuggestionHandler<this.func.definition>]>Methods
addHandler(actionConstraint: BlockActionConstraint, handler: BlockSuggestionHandler<FunctionDefinitionArgs<InputParameters, OutputParameters, RequiredInput, RequiredOutput>>): SuggestionRouter<InputParameters, OutputParameters, RequiredInput, RequiredOutput>
Add a suggestion handler for something that can match an action event.
export()
Returns a method handling routing of suggestion payloads to the appropriate suggestion handler.
The output of export() should be attached to the blockSuggestion
export of your function.
matchHandler(action: BlockAction): BlockSuggestionHandler<FunctionDefinitionArgs<InputParameters, OutputParameters, RequiredInput, RequiredOutput>> | null
Return the first registered SuggestionHandler that matches the action and/or block ID string(s) provided.