integrations.slack.functions module¶
integrations/slack/functions.py
- class integrations.slack.functions.SvcFunctions¶
Bases:
FunctionsInterfaceslack専用関数
- __init__(api, conf)¶
- Parameters:
api (AdapterAPI)
conf (SvcConfig)
- api¶
API操作オブジェクト
- conf¶
個別設定
- get_channel_id()¶
チャンネルIDを取得する
- Returns:
チャンネルID
- Return type:
str
- get_conversations(m)¶
スレッド情報の取得
- Parameters:
m (MessageParserProtocol) – メッセージデータ
- Returns:
API response
- Return type:
dict[str, Any]
- get_dm_channel_id(user_id)¶
DMのチャンネルIDを取得する
- Parameters:
user_id (str) – DMの相手
- Returns:
チャンネルID
- Return type:
str
- get_message_details(matches)¶
メッセージ詳細情報取得
- Parameters:
matches (list[MessageParserProtocol]) – 対象データ
- Returns:
詳細情報追加データ
- Return type:
list[MessageParserProtocol]
- get_messages(words)¶
slackログからメッセージを検索して返す
- Parameters:
words (Union[str, list[str]]) – 検索するワード
- Returns:
検索した結果
- Return type:
list[MessageParserProtocol]
- get_reactions_list(msg)¶
botが付けたリアクションを取得
- Parameters:
msg (dict[str, Any]) – メッセージ内容
- Returns:
reaction_ok: okが付いているメッセージのタイムスタンプ
reaction_ng: ngが付いているメッセージのタイムスタンプ
- Return type:
tuple[list,list]
- pickup_remarks()¶
slackログからメモを検索して返す
- Returns:
検索した結果
- Return type:
list[MessageParserProtocol]
- pickup_score()¶
過去ログからスコア記録を検索して返す
- Returns:
検索した結果
- Return type:
list[MessageParserProtocol]
- post_processing(m)¶
後処理
- Parameters:
m (MessageParserProtocol) – メッセージデータ
- Return type:
None
- reaction_append(icon, ch, ts)¶
リアクション追加
- Parameters:
icon (str) – リアクション文字
ch (str) – チャンネルID
ts (str) – メッセージのタイムスタンプ
- Return type:
None
- reaction_remove(icon, ch, ts)¶
リアクション削除
- Parameters:
icon (str) – リアクション文字
ch (str) – チャンネルID
ts (str) – メッセージのタイムスタンプ
- Return type:
None
- reaction_status(ch, ts)¶
botが付けたリアクションの種類を返す
- Parameters:
ch (str) – チャンネルID
ts (str) – メッセージのタイムスタンプ
- Returns:
リアクション - str:
okorng- list[str]: タイムスタンプ- Return type:
dict[str, list[str]]