Messages
Messages are the core unit of Slack messaging functionality. They can be built out using blocks, elements, objects, and rich text features.
See: https://api.slack.com/messaging
Message
A Slack message object that can be converted to a JSON string for use with the Slack message API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
channel |
str
|
|
required |
text |
Optional[str]
|
markdown text to send in the message. If |
''
|
blocks |
Optional[Union[List[Block], Block]]
|
a list of |
None
|
attachments |
Optional[List[Attachment]]
|
a list of
|
None
|
thread_ts |
Optional[str]
|
the timestamp ID of another unthreaded message that will become the parent message of this message (now a reply in a thread). |
None
|
mrkdwn |
bool
|
if |
True
|
unfurl_links |
Optional[bool]
|
if |
None
|
unfurl_media |
Optional[bool]
|
if |
None
|
Throws:
InvalidUsageException: in the event that the items passed to blocks
are not valid Blocks
.
Source code in slackblocks/messages.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
|