Slack
Module for Slack-related utilities.
edit_slack_message
async
¶
Edit an existing Slack message by appending new text or replacing it.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
channel
|
str
|
The Slack channel ID. |
required |
ts
|
str
|
The timestamp of the message to edit. |
required |
new_text
|
str
|
The new text to append or replace in the message. |
required |
mode
|
str
|
The mode of text editing, 'append' (default) or 'replace'. |
'append'
|
Returns:
Type | Description |
---|---|
Response
|
httpx.Response: The response from the Slack API. |
fetch_current_message_text
async
¶
Fetch the current text of a specific Slack message using its timestamp.
get_thread_messages
async
¶
Get all messages from a slack thread.
get_token
async
¶
Get the Slack bot token from the environment.
search_slack_messages
async
¶
Search for messages in Slack workspace based on a query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
str
|
The search query. |
required |
max_messages
|
int
|
The maximum number of messages to retrieve. |
3
|
channel
|
str
|
The specific channel to search in. Defaults to None, which searches all channels. |
None
|
Returns:
Name | Type | Description |
---|---|---|
list |
list
|
A list of message contents and permalinks matching the query. |