slack-python-webhook | Slack.com bot in Python for webhook | Bot library
kandi X-RAY | slack-python-webhook Summary
kandi X-RAY | slack-python-webhook Summary
Slack.com bot in Python for webhook
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Send notification
- Send the given payload
slack-python-webhook Key Features
slack-python-webhook Examples and Code Snippets
Community Discussions
Trending Discussions on slack-python-webhook
QUESTION
I'm creating a Python script to send messages to a slack channel. The message itself gets delivered fine, however when I try to start a thread and send replies to the thread, I am unable to get it working. The thread replies appear as a new parent message.
I'm using the slack-python-webhook module found at https://github.com/satoshi03/slack-python-webhook
...ANSWER
Answered 2019-Aug-01 at 11:00Your code won't work, because webhooks do not support threads. If you want to reply to threads you need to use the API methods for posting message (e.g. chat.postMessage
).
That means you probably also need to use a different library, since the one mentioned in your question appears to only support webhooks.
Also your syntax is not correct. thread_ts
is not a property of an attachment, but a parameter of a API method like channel
.
I would recommend to check out the slackclient. It's the official Python library from Slack and has full support for all API methods incl. threads.
Here is how to reply to a thread with slackclient:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install slack-python-webhook
Get a token of slack webhook on slack page.
Message Formatting
Attachments
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page