Class ChatPostEphemeralRequest.ChatPostEphemeralRequestBuilder
java.lang.Object
com.slack.api.methods.request.chat.ChatPostEphemeralRequest.ChatPostEphemeralRequestBuilder
- Enclosing class:
- ChatPostEphemeralRequest
public static class ChatPostEphemeralRequest.ChatPostEphemeralRequestBuilder
extends java.lang.Object
-
Method Summary
Modifier and Type Method Description ChatPostEphemeralRequest.ChatPostEphemeralRequestBuilderasUser(java.lang.Boolean asUser)Pass true to post the message as the authed user, instead of as a bot.ChatPostEphemeralRequest.ChatPostEphemeralRequestBuilderattachments(java.util.List<Attachment> attachments)A JSON-based array of structured attachments, presented as a URL-encoded string.ChatPostEphemeralRequest.ChatPostEphemeralRequestBuilderattachmentsAsString(java.lang.String attachmentsAsString)A JSON-based array of structured attachments, presented as a URL-encoded string.ChatPostEphemeralRequest.ChatPostEphemeralRequestBuilderblocks(java.util.List<LayoutBlock> blocks)A JSON-based array of structured blocks, presented as a URL-encoded string.ChatPostEphemeralRequest.ChatPostEphemeralRequestBuilderblocksAsString(java.lang.String blocksAsString)A JSON-based array of structured blocks as a String, presented as a URL-encoded string.ChatPostEphemeralRequestbuild()ChatPostEphemeralRequest.ChatPostEphemeralRequestBuilderchannel(java.lang.String channel)Channel, private group, or IM channel to send message to.ChatPostEphemeralRequest.ChatPostEphemeralRequestBuildericonEmoji(java.lang.String iconEmoji)Emoji to use as the icon for this message.ChatPostEphemeralRequest.ChatPostEphemeralRequestBuildericonUrl(java.lang.String iconUrl)URL to an image to use as the icon for this message.ChatPostEphemeralRequest.ChatPostEphemeralRequestBuilderlinkNames(boolean linkNames)Find and link channel names and usernames.ChatPostEphemeralRequest.ChatPostEphemeralRequestBuilderparse(java.lang.String parse)Change how messages are treated.ChatPostEphemeralRequest.ChatPostEphemeralRequestBuildertext(java.lang.String text)Text of the message to send.ChatPostEphemeralRequest.ChatPostEphemeralRequestBuilderthreadTs(java.lang.String threadTs)Provide another message's ts value to post this message in a thread.ChatPostEphemeralRequest.ChatPostEphemeralRequestBuildertoken(java.lang.String token)Authentication token.java.lang.StringtoString()ChatPostEphemeralRequest.ChatPostEphemeralRequestBuilderuser(java.lang.String user)`id` of the user who will receive the ephemeral message.ChatPostEphemeralRequest.ChatPostEphemeralRequestBuilderusername(java.lang.String username)Set your bot's user name.
-
Method Details
-
token
Authentication token. Requires scope: `chat:write`- Returns:
this.
-
channel
Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.- Returns:
this.
-
text
Text of the message to send. See below for an explanation of [formatting](#formatting). This field is usually required, unless you're providing only `attachments` instead.- Returns:
this.
-
user
`id` of the user who will receive the ephemeral message. The user should be in the channel specified by the `channel` argument.- Returns:
this.
-
asUser
Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See [authorship](#authorship) below.NOTE: The default value is intentionally null to support workplace apps.
- Returns:
this.
-
blocks
public ChatPostEphemeralRequest.ChatPostEphemeralRequestBuilder blocks(java.util.List<LayoutBlock> blocks)A JSON-based array of structured blocks, presented as a URL-encoded string.- Returns:
this.
-
blocksAsString
public ChatPostEphemeralRequest.ChatPostEphemeralRequestBuilder blocksAsString(java.lang.String blocksAsString)A JSON-based array of structured blocks as a String, presented as a URL-encoded string.- Returns:
this.
-
attachments
public ChatPostEphemeralRequest.ChatPostEphemeralRequestBuilder attachments(java.util.List<Attachment> attachments)A JSON-based array of structured attachments, presented as a URL-encoded string.- Returns:
this.
-
attachmentsAsString
public ChatPostEphemeralRequest.ChatPostEphemeralRequestBuilder attachmentsAsString(java.lang.String attachmentsAsString)A JSON-based array of structured attachments, presented as a URL-encoded string.- Returns:
this.
-
threadTs
public ChatPostEphemeralRequest.ChatPostEphemeralRequestBuilder threadTs(java.lang.String threadTs)Provide another message's ts value to post this message in a thread. Avoid using a reply's ts value; use its parent's value instead. Ephemeral messages in threads are only shown if there is already an active thread.- Returns:
this.
-
iconEmoji
public ChatPostEphemeralRequest.ChatPostEphemeralRequestBuilder iconEmoji(java.lang.String iconEmoji)Emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. https://api.slack.com/methods/chat.postEphemeral#authorship- Returns:
this.
-
iconUrl
URL to an image to use as the icon for this message. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. https://api.slack.com/methods/chat.postEphemeral#authorship- Returns:
this.
-
username
public ChatPostEphemeralRequest.ChatPostEphemeralRequestBuilder username(java.lang.String username)Set your bot's user name. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. https://api.slack.com/methods/chat.postEphemeral#authorship- Returns:
this.
-
linkNames
Find and link channel names and usernames.- Returns:
this.
-
parse
Change how messages are treated. Defaults to `none`. See [below](#formatting).- Returns:
this.
-
build
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-