-
Notifications
You must be signed in to change notification settings - Fork 288
Expand file tree
/
Copy pathset_status.py
More file actions
34 lines (29 loc) · 794 Bytes
/
set_status.py
File metadata and controls
34 lines (29 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from typing import List, Optional
from slack_sdk import WebClient
from slack_sdk.web import SlackResponse
class SetStatus:
client: WebClient
channel_id: str
thread_ts: str
def __init__(
self,
client: WebClient,
channel_id: str,
thread_ts: str,
):
self.client = client
self.channel_id = channel_id
self.thread_ts = thread_ts
def __call__(
self,
status: str,
loading_messages: Optional[List[str]] = None,
**kwargs,
) -> SlackResponse:
return self.client.assistant_threads_setStatus(
channel_id=self.channel_id,
thread_ts=self.thread_ts,
status=status,
loading_messages=loading_messages,
**kwargs,
)