lunarflu HF staff commited on
Commit
7b3eccf
1 Parent(s): f034bb8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -62,13 +62,13 @@ async def on_message(message):
62
  try:
63
  # title
64
  response = slack_client.chat_postMessage(
65
- channel=SLACK_CHANNEL,
66
  text=f"New post in {message.channel.name} by {message.author}:\n*{title}*"
67
  )
68
  # reply in thread
69
  thread_ts = response['ts']
70
  slack_client.chat_postMessage(
71
- channel=SLACK_CHANNEL,
72
  text=content,
73
  thread_ts=thread_ts
74
  )
@@ -79,7 +79,7 @@ async def on_message(message):
79
  async def post_to_slack(author, content, channel, url, slack_mention, trigger):
80
  try:
81
  response = slack_client.chat_postMessage(
82
- channel=SLACK_CHANNEL,
83
  text=f"{slack_mention} (for the keyword -> '{trigger}')\nFrom {author} in channel #{channel}: {content}\n{url}"
84
  )
85
  except SlackApiError as e:
 
62
  try:
63
  # title
64
  response = slack_client.chat_postMessage(
65
+ channel=SLACK_CHANNEL_ID,
66
  text=f"New post in {message.channel.name} by {message.author}:\n*{title}*"
67
  )
68
  # reply in thread
69
  thread_ts = response['ts']
70
  slack_client.chat_postMessage(
71
+ channel=SLACK_CHANNEL_ID,
72
  text=content,
73
  thread_ts=thread_ts
74
  )
 
79
  async def post_to_slack(author, content, channel, url, slack_mention, trigger):
80
  try:
81
  response = slack_client.chat_postMessage(
82
+ channel=SLACK_CHANNEL_ID,
83
  text=f"{slack_mention} (for the keyword -> '{trigger}')\nFrom {author} in channel #{channel}: {content}\n{url}"
84
  )
85
  except SlackApiError as e: