lunarflu HF staff commited on
Commit
687dc78
·
verified ·
1 Parent(s): e046b70

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -183,6 +183,17 @@ async def on_thread_update(before, after):
183
  slack_thread_ts = thread_mapping[discord_thread_id]
184
  react_to_slack_message(slack_thread_ts, 'white_check_mark')
185
 
 
 
 
 
 
 
 
 
 
 
 
186
  #----------------------------------------------------------------------------------------------
187
 
188
  def send_daily_pings():
 
183
  slack_thread_ts = thread_mapping[discord_thread_id]
184
  react_to_slack_message(slack_thread_ts, 'white_check_mark')
185
 
186
+
187
+ def react_to_slack_message(thread_ts, emoji):
188
+ try:
189
+ response = slack_client.reactions_add(
190
+ channel=SLACK_CHANNEL_ID,
191
+ name=emoji,
192
+ timestamp=thread_ts
193
+ )
194
+ except SlackApiError as e:
195
+ print(f"Error reacting to Slack message: {e.response['error']}")
196
+
197
  #----------------------------------------------------------------------------------------------
198
 
199
  def send_daily_pings():