Skip to content

Commit 7c0eff6

Browse files
zimegClaude
andcommitted
feat(methods): add entity.acknowledgeCommentAction method example
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
1 parent b86b328 commit 7c0eff6

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

‎methods/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ $ slack run chat_post_message.py # Make the request
5656

5757
### entity
5858

59+
- **[entity.acknowledgeCommentAction](https://docs.slack.dev/reference/methods/entity.acknowledgeCommentAction)**: Acknowledge a comment post, edit, or delete on a Work Object. Apps call this method to confirm they have processed a comment action. [Implementation](./src/entity/entity_acknowledge_comment_action.py).
5960
- **[entity.presentComments](https://docs.slack.dev/reference/methods/entity.presentComments)**: Provide comments for Work Objects. Apps call this method to send per-user flexpane comment data to the client. [Implementation](./src/entity/entity_present_comments.py).
6061

6162
### slackbot
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import os
2+
3+
from slack_sdk import WebClient
4+
5+
# Read a token from an environment variable
6+
token = os.environ.get("SLACK_TOKEN")
7+
8+
# Initialize
9+
client = WebClient(token=token)
10+
11+
# Call the entity.acknowledgeCommentAction method
12+
response = client.entity_acknowledgeCommentAction(
13+
trigger_id="1234567890123.1234567890123.abcdef01234567890abcdef012345689",
14+
comment={
15+
"id": "comment-unique-identifier-003",
16+
"sender": {
17+
"user_id": "U123456789",
18+
},
19+
"comment": {
20+
"value": "The saved comment text",
21+
"format": "markdown",
22+
},
23+
"timestamp": 1741164500,
24+
"url": "your.app/item/1/comment/3",
25+
"thread_root_id": "comment-unique-identifier-001",
26+
},
27+
)
28+
29+
# Inspect the response
30+
print(response)

0 commit comments

Comments
 (0)