Slackblocks.MessageResponse (slackblocks v2.8.0)
View SourceA response body for slash commands and interaction response URLs.
Slack reference: https://docs.slack.dev/interactivity/handling-user-interaction#message_responses
Fields
blocks— Adds the response blocks in display order. Optional;nilomits the field.attachments— Adds legacy attachments in display order. Optional;nilomits the field.text— Sets the fallback text used in notifications and by clients that cannot display blocks. Default:"". Optional;nilomits the field.mrkdwn— Sets whether Slack formats the top-level text as mrkdwn. Default:true. Optional;nilomits the field.replace_original— Sets whether the response replaces the message that triggered it. Default:false. Optional;nilomits the field.response_type— Sets who can see the response. Default::in_channel. Optional;nilomits the field.
Summary
Functions
Atomically replaces supplied fields; omitted fields retain their values.
Replaces fields or raises Slackblocks.ValidationError.
Constructs and validates a value. Text conveniences apply to keyword input.
Constructs a value or raises Slackblocks.ValidationError.
Types
@type t() :: %Slackblocks.MessageResponse{ attachments: [Slackblocks.Attachment.t()] | nil, blocks: [Slackblocks.Types.block()] | nil, mrkdwn: boolean() | nil, replace_original: boolean() | nil, response_type: Slackblocks.Types.response_type() | nil, text: binary() | nil }
Functions
@spec change( t(), keyword() ) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
Atomically replaces supplied fields; omitted fields retain their values.
Replaces fields or raises Slackblocks.ValidationError.
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
Constructs and validates a value. Text conveniences apply to keyword input.
Constructs a value or raises Slackblocks.ValidationError.