Skip to main content

matchConstraints()

function matchConstraints(constraints): Middleware<
| {
ack: | AckFn<void>
| AckFn<string | SayArguments>
| AckFn<DialogValidation>;
action: | DialogSubmitAction
| BlockElementAction
| InteractiveAction;
body: SlackAction;
complete?: FunctionCompleteFn;
fail?: FunctionFailFn;
inputs?: FunctionInputs;
payload: | DialogSubmitAction
| BlockElementAction
| InteractiveAction;
respond: RespondFn;
}
| SlackOptionsMiddlewareArgs<"interactive_message" | "block_suggestion" | "dialog_suggestion">
| SlackViewMiddlewareArgs<SlackViewAction>>;

Defined in: src/middleware/builtin.ts:142

Middleware that checks for matches given constraints

Parameters

constraints

| ActionConstraints<SlackAction> | ViewConstraints | ShortcutConstraints<SlackShortcut> | OptionsConstraints<SlackOptions>

Returns

Middleware< | { ack: | AckFn<void> | AckFn<string | SayArguments> | AckFn<DialogValidation>; action: | DialogSubmitAction | BlockElementAction | InteractiveAction; body: SlackAction; complete?: FunctionCompleteFn; fail?: FunctionFailFn; inputs?: FunctionInputs; payload: | DialogSubmitAction | BlockElementAction | InteractiveAction; respond: RespondFn; } | SlackOptionsMiddlewareArgs<"interactive_message" | "block_suggestion" | "dialog_suggestion"> | SlackViewMiddlewareArgs<SlackViewAction>>