Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -78,10 +78,6 @@ async def on_message(message):
|
|
| 78 |
if bots_role not in message.author.roles: # bots shouldn't trigger pings for this
|
| 79 |
print(" not bot ")
|
| 80 |
content = message.content.lower()
|
| 81 |
-
|
| 82 |
-
CUSTOM_timestamp = 1609459200
|
| 83 |
-
message_jump_url = f'<!date^{CUSTOM_timestamp}^{{{message.jump_url}}}>'
|
| 84 |
-
print(message_jump_url)
|
| 85 |
|
| 86 |
for trigger, slack_mention in TRIGGERS.items():
|
| 87 |
if all(word in content for word in trigger):
|
|
@@ -89,7 +85,7 @@ async def on_message(message):
|
|
| 89 |
'author': str(message.author),
|
| 90 |
'content': message.content,
|
| 91 |
'channel': message.channel.name,
|
| 92 |
-
'url':
|
| 93 |
'mention': slack_mention,
|
| 94 |
'trigger': trigger
|
| 95 |
})
|
|
@@ -164,7 +160,9 @@ def send_daily_pings():
|
|
| 164 |
|
| 165 |
response = slack_client.chat_postMessage(
|
| 166 |
channel=SLACK_CHANNEL_ID_TEST,
|
| 167 |
-
text=combined_message
|
|
|
|
|
|
|
| 168 |
)
|
| 169 |
|
| 170 |
|
|
|
|
| 78 |
if bots_role not in message.author.roles: # bots shouldn't trigger pings for this
|
| 79 |
print(" not bot ")
|
| 80 |
content = message.content.lower()
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
|
| 82 |
for trigger, slack_mention in TRIGGERS.items():
|
| 83 |
if all(word in content for word in trigger):
|
|
|
|
| 85 |
'author': str(message.author),
|
| 86 |
'content': message.content,
|
| 87 |
'channel': message.channel.name,
|
| 88 |
+
'url': message.jump_url,
|
| 89 |
'mention': slack_mention,
|
| 90 |
'trigger': trigger
|
| 91 |
})
|
|
|
|
| 160 |
|
| 161 |
response = slack_client.chat_postMessage(
|
| 162 |
channel=SLACK_CHANNEL_ID_TEST,
|
| 163 |
+
text=combined_message,
|
| 164 |
+
unfurl_links=False,
|
| 165 |
+
unfurl_media=False
|
| 166 |
)
|
| 167 |
|
| 168 |
|