Skip to content

Commit

Permalink
ephemeralなテキストを直接チャンネルに書き込むように変更
Browse files Browse the repository at this point in the history
  • Loading branch information
yutoml committed Apr 12, 2024
1 parent 5c8367b commit 173dfe6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions slack_translator_bot/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,11 @@ def translation_ephemeral(target_lang, private_metadata):
== private_metadata][0]
post_text = translate(
original_text=param["text"], target_langs=[target_lang])

# スレッドに投稿する場合はこちらのコメントアウトをはずし、下をコメントアウトする
# app.client.chat_postEphemeral(
# channel=param["channel"]["id"], user=param["user"]["id"], text=post_text, thread_ts=param["ts"])

app.client.chat_postEphemeral(
channel=param["channel"]["id"], user=param["user"]["id"], text=post_text)

Expand Down

0 comments on commit 173dfe6

Please sign in to comment.