-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChannel.java
More file actions
24 lines (22 loc) · 799 Bytes
/
Copy pathChannel.java
File metadata and controls
24 lines (22 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package elements;
import com.slack.api.model.block.Blocks;
import com.slack.api.model.block.RichTextBlock;
import com.slack.api.model.block.element.RichTextSectionElement;
import java.util.List;
/**
* Renders as a mention of a channel.
* {@link https://docs.slack.dev/reference/block-kit/block-elements/channel-element/}
*/
public class Channel {
/**
* A rich text block with a channel mention in a section.
*/
public static RichTextBlock example01() {
RichTextBlock block = Blocks.richText(rt -> rt.elements(List.of(RichTextSectionElement.builder()
.elements(List.of(RichTextSectionElement.Channel.builder()
.channelId("C123ABC456")
.build()))
.build())));
return block;
}
}