import { type SlackActionMiddlewareArgs } from "https://deno.land/x/slack_bolt@1.0.0/mod.ts";
Arguments which listeners and middleware receive to process an action from Slack's Block Kit interactive components, message actions, dialogs, or legacy interactive messages.
The type parameter Action
represents the entire JSON-encoded request body from Slack. The generic type
BlockAction<ElementAction>
can be used to create a type for this parameter based on an element's action type. In
this case ElementAction
must extend BasicElementAction
.
Type Parameters
optional
Action extends SlackAction = SlackActionProperties
payload: Action extends BlockAction<infer ElementAction> ? ElementAction : Action extends InteractiveMessage<infer InteractiveAction> ? InteractiveAction : Action
action: Action extends BlockAction<infer ElementAction> ? ElementAction : Action extends InteractiveMessage<infer InteractiveAction> ? InteractiveAction : Action
body: Action
say: Action extends Exclude<SlackAction, DialogSubmitAction | WorkflowStepEdit> ? SayFn : never
respond: RespondFn
ack: ActionAckFn<Action>