slackline/api/chat/post_message
This module is generated by gleam run -m slackline_codegen/generate. Do not edit it by hand.
Setters for the optional arguments of
chat.postMessage.
Each setter takes the call that chat.post_message returns and sets one
argument:
chat.post_message(channel: "channel", text: "Hello world")
|> post_message.attachments(attachments)
Values
pub fn as_user(
call: slackline.Call(chat.PostMessage, r),
as_user: Bool,
) -> slackline.Call(chat.PostMessage, r)
(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.
pub fn attachments(
call: slackline.Call(chat.PostMessage, r),
attachments: List(attachment.Attachment),
) -> slackline.Call(chat.PostMessage, r)
A list of structured attachments.
pub fn blocks(
call: slackline.Call(chat.PostMessage, r),
blocks: List(block.Block),
) -> slackline.Call(chat.PostMessage, r)
A list of structured blocks.
pub fn current_draft_last_updated_ts(
call: slackline.Call(chat.PostMessage, r),
current_draft_last_updated_ts: String,
) -> slackline.Call(chat.PostMessage, r)
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.
pub fn icon_emoji(
call: slackline.Call(chat.PostMessage, r),
icon_emoji: String,
) -> slackline.Call(chat.PostMessage, r)
Emoji to use as the icon for this message. Overrides icon_url.
pub fn icon_url(
call: slackline.Call(chat.PostMessage, r),
icon_url: String,
) -> slackline.Call(chat.PostMessage, r)
URL to an image to use as the icon for this message.
pub fn link_names(
call: slackline.Call(chat.PostMessage, r),
link_names: Bool,
) -> slackline.Call(chat.PostMessage, r)
Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.
pub fn markdown_text(
call: slackline.Call(chat.PostMessage, r),
markdown_text: String,
) -> slackline.Call(chat.PostMessage, r)
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.
pub fn metadata(
call: slackline.Call(chat.PostMessage, r),
metadata: message.MessageMetadata,
) -> slackline.Call(chat.PostMessage, r)
A JSON object with event_type and event_payload fields, or Work
Object entity metadata. Metadata you post to Slack is accessible to
any app or user who is a member of that workspace.
pub fn mrkdwn(
call: slackline.Call(chat.PostMessage, r),
mrkdwn: Bool,
) -> slackline.Call(chat.PostMessage, r)
Disable Slack markup parsing by setting to false. Enabled by default.
Defaults to true.
pub fn parse(
call: slackline.Call(chat.PostMessage, r),
parse: chat.ParseMode,
) -> slackline.Call(chat.PostMessage, r)
Change how messages are treated. See below.
pub fn reply_broadcast(
call: slackline.Call(chat.PostMessage, r),
reply_broadcast: Bool,
) -> slackline.Call(chat.PostMessage, r)
Used in conjunction with thread_ts and indicates whether reply should be
made visible to everyone in the channel or conversation. Defaults to
false.
pub fn thread_ts(
call: slackline.Call(chat.PostMessage, r),
thread_ts: String,
) -> slackline.Call(chat.PostMessage, r)
Provide another message’s ts value to make this message a reply. Avoid
using a reply’s ts value; use its parent instead.
pub fn unfurl_app_links(
call: slackline.Call(chat.PostMessage, r),
unfurl_app_links: Bool,
) -> slackline.Call(chat.PostMessage, r)
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.
pub fn unfurl_links(
call: slackline.Call(chat.PostMessage, r),
unfurl_links: Bool,
) -> slackline.Call(chat.PostMessage, r)
Pass true to enable unfurling of primarily text-based content.
pub fn unfurl_media(
call: slackline.Call(chat.PostMessage, r),
unfurl_media: Bool,
) -> slackline.Call(chat.PostMessage, r)
Pass false to disable unfurling of media content.
pub fn username(
call: slackline.Call(chat.PostMessage, r),
username: String,
) -> slackline.Call(chat.PostMessage, r)
Set your bot’s user name.