-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtext.py
More file actions
28 lines (25 loc) · 849 Bytes
/
Copy pathtext.py
File metadata and controls
28 lines (25 loc) · 849 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
25
26
27
28
from slack_sdk.models.blocks import RichTextBlock
from slack_sdk.models.blocks.block_elements import (
RichTextElementParts,
RichTextSectionElement,
)
def example01() -> RichTextBlock:
"""
Displays text, optionally with styling.
https://docs.slack.dev/reference/block-kit/block-elements/text-element/
A rich text block with plain and bold text elements in a section.
"""
block = RichTextBlock(
elements=[
RichTextSectionElement(
elements=[
RichTextElementParts.Text(text="Hello there, "),
RichTextElementParts.Text(
text="I am a bold rich text block!",
style=RichTextElementParts.TextStyle(bold=True),
),
]
)
]
)
return block