Skip to content

Commit fe273e2

Browse files
committed
Updated README
1 parent e91dcef commit fe273e2

File tree

1 file changed

+36
-5
lines changed

1 file changed

+36
-5
lines changed

README.rst

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ Whether you're building a custom app for your team, or integrating a third party
2121
service into your Slack workflows, Slack Developer Kit for Python allows you to leverage the flexibility
2222
of Python to get your project up and running as quickly as possible.
2323

24+
25+
Documentation
26+
--------------
27+
28+
For comprehensive method information and usage examples, see the `full documentation <http://slackapi.github.io/python-slackclient>`_.
29+
2430
Requirements and Installation
2531
******************************
2632

@@ -49,11 +55,6 @@ If you get stuck, we’re here to help. The following are the best ways to get a
4955
- Use our `Github Issue Tracker <https://github.com/slackapi/python-slackclient/issues>`_ for reporting bugs or requesting features.
5056
- 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.
5157

52-
Documentation
53-
--------------
54-
55-
For comprehensive method information and usage examples, see the `full documentation <http://slackapi.github.io/python-slackclient>`_.
56-
5758
Basic Usage
5859
------------
5960
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 **
8990
section of the `chat.postMessage <https://api.slack.com/methods/chat.postMessage#channels>`_
9091
page for a full list of formatting and authorship options.
9192

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.
121+
122+
92123
Deleting a message
93124
********************
94125
Sometimes you need to delete things.

0 commit comments

Comments
 (0)