slack.postmessageprops
Home > @runlightyear/slack > PostMessageProps
PostMessageProps interface
Props for postMessage
Signature:interface PostMessageProps
Required Properties
Property | Modifiers | Type | Description |
---|---|---|---|
channel | string | Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. |
Optional Properties
Property | Modifiers | Type | Description |
---|---|---|---|
asUser? | boolean | Set to true to post the message as the authed user, instead of as a bot. Defaults to false. Cannot be used by new Slack apps. | |
attachments? | string | An array of attachments. | |
blocks? | Array<BlockInput> | An array of structured blocks | |
iconEmoji? | string | Emoji to use as the icon for this message. Overrides iconUrl. Must be used in conjunction with asUser set to false, otherwise ignored. Example :chart_with_upwards_trend: | |
iconUrl? | string | URL to an image to use as the icon for this message. Must be used in conjunction with asUser set to false, otherwise ignored. | |
linkNames? | string | Find and link user groups. No longer supports linking individual users. | |
metadata? | Event | Metadata you post to Slack is accessible to any app or user who is a member of that workspace. | |
mrkdwn? | boolean | Disable Slack markup parsing by setting to false. Enabled by default. | |
parse? | "full" | "none" | Change how messages are treated. Messages are formatted as described in the formatting spec. The formatting behavior will change depending on the value of parse. By default, URLs will be hyperlinked. Set parse to none to remove the hyperlinks. The behavior of parse is different for text formatted with mrkdwn. By default, or when parse is set to none, mrkdwn formatting is implemented. To ignore mrkdwn formatting, set parse to full. | |
replyBroadcast? | boolean | 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? | string | The formatted text of the message to be published. If blocks are included, this will become the fallback text used in notifications. | |
threadTs? | string | Provide another message's ts value to make this message a reply. Avoid using a reply's ts value; use its parent instead. | |
unfurlLinks? | boolean | Pass true to enable unfurling of primarily text-based content. | |
unfurlMedia? | boolean | Pass false to disable unfurling of media content. | |
username? | string | Set your bot's user name. Must be used in conjunction with as_user set to false, otherwise ignored. |