#[non_exhaustive]pub struct ChatPostMessageRequest {Show 19 fields
pub channel: String,
pub as_user: Option<bool>,
pub attachments: Option<Vec<Attachment>>,
pub blocks: Option<Vec<Block>>,
pub current_draft_last_updated_ts: Option<String>,
pub icon_emoji: Option<String>,
pub icon_url: Option<String>,
pub link_names: Option<bool>,
pub markdown_text: Option<String>,
pub metadata: Option<MessageMetadata>,
pub mrkdwn: Option<bool>,
pub parse: Option<String>,
pub reply_broadcast: Option<bool>,
pub text: Option<String>,
pub thread_ts: Option<String>,
pub unfurl_links: Option<bool>,
pub unfurl_media: Option<bool>,
pub username: Option<String>,
pub unfurl_app_links: Option<bool>,
}Expand description
Arguments for the Slack Web API method chat.postMessage: Sends a message to a channel.
Send it with SlackClient::chat_post_message.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.channel: StringAn encoded ID or channel name that represents a channel, private group, or IM channel to send the message to. See below for more details.
as_user: Option<bool>(Legacy) Pass true to post the message as the authed user instead of as a bot. Defaults to false. Can only be used by classic apps. See legacy as_user parameter below.
attachments: Option<Vec<Attachment>>A JSON-based array of structured attachments, presented as a URL-encoded string.
blocks: Option<Vec<Block>>A JSON-based array of structured blocks, presented as a URL-encoded string.
current_draft_last_updated_ts: Option<String>This field represents the timestamp of the draft’s last update at the time this API is called. If the current message is a draft, this field can be provided to ensure synchronization with the server.
icon_emoji: Option<String>Emoji to use as the icon for this message. Overrides icon_url.
icon_url: Option<String>URL to an image to use as the icon for this message.
link_names: Option<bool>Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.
markdown_text: Option<String>Accepts message text formatted in markdown. This argument should not be used in conjunction with blocks or text. Limit this field to 12,000 characters.
metadata: Option<MessageMetadata>JSON object with event_type and event_payload fields, presented as a URL-encoded string. You can also provide Work Object entity metadata using this parameter. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.
mrkdwn: Option<bool>Disable Slack markup parsing by setting to false. Enabled by default.
parse: Option<String>Change how messages are treated. See below.
reply_broadcast: Option<bool>Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false.
text: Option<String>How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.
thread_ts: Option<String>Provide another message’s ts value to make this message a reply. Avoid using a reply’s ts value; use its parent instead.
unfurl_links: Option<bool>Pass true to enable unfurling of primarily text-based content.
unfurl_media: Option<bool>Pass false to disable unfurling of media content.
username: Option<String>Set your bot’s user name.
unfurl_app_links: Option<bool>Pass true to unfurl links from installed apps, or false to prevent app links from unfurling. When omitted, app links follow the unfurl_links setting.