You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+36-5Lines changed: 36 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,12 @@ Whether you're building a custom app for your team, or integrating a third party
21
21
service into your Slack workflows, Slack Developer Kit for Python allows you to leverage the flexibility
22
22
of Python to get your project up and running as quickly as possible.
23
23
24
+
25
+
Documentation
26
+
--------------
27
+
28
+
For comprehensive method information and usage examples, see the `full documentation <http://slackapi.github.io/python-slackclient>`_.
29
+
24
30
Requirements and Installation
25
31
******************************
26
32
@@ -49,11 +55,6 @@ If you get stuck, we’re here to help. The following are the best ways to get a
49
55
- Use our `Github Issue Tracker <https://github.com/slackapi/python-slackclient/issues>`_ for reporting bugs or requesting features.
50
56
- Visit the `dev4slack channel <http://dev4slack.xoxco.com>`_ for getting help using Slack Developer Kit for Python or just generally bond with your fellow Slack developers.
51
57
52
-
Documentation
53
-
--------------
54
-
55
-
For comprehensive method information and usage examples, see the `full documentation <http://slackapi.github.io/python-slackclient>`_.
56
-
57
58
Basic Usage
58
59
------------
59
60
The Slack Web API allows you to build applications that interact with Slack in more complex ways than the integrations
@@ -89,6 +90,36 @@ There are some unique options specific to sending IMs, so be sure to read the **
89
90
section of the `chat.postMessage <https://api.slack.com/methods/chat.postMessage#channels>`_
90
91
page for a full list of formatting and authorship options.
91
92
93
+
94
+
Replying to messages and creating threads
95
+
********************
96
+
Threaded messages are just like regular messages, except thread replies are grouped together to provide greater context
97
+
to the user. You can reply to a thread or start a new threaded conversation by simply passing the original message's `ts`
98
+
ID in the `thread_ts` attribute when posting a message. If you're replying to a threaded message, you'll pass the `thread_ts`
99
+
ID of the message you're replying to.
100
+
101
+
.. code-block:: python
102
+
103
+
from slackclient import SlackClient
104
+
105
+
slack_token = os.environ["SLACK_API_TOKEN"]
106
+
sc = SlackClient(slack_token)
107
+
108
+
sc.api_call(
109
+
"chat.postMessage",
110
+
channel="#python",
111
+
text="Hello from Python! :tada:",
112
+
thread_ts="1476746830.000003"
113
+
)
114
+
115
+
A channel or DM conversation is a nearly linear timeline of messages exchanged between people, bots, and apps.
116
+
When one of these messages is replied to, it becomes the parent of a thread. By default, threaded replies do not
117
+
appear directly in the channel, instead relegated to a kind of forked timeline descending from the parent message.
118
+
See our `Threading messages together <https://api.slack.com/docs/message-threading#forking_conversations>`_.
119
+
120
+
Updates and deletion of threaded replies works the same as regular messages.
0 commit comments