We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50ef109 commit d7b610aCopy full SHA for d7b610a
Slack_Push_Notification.py
@@ -2,11 +2,12 @@
2
''' This script is used to get a Push Notification on Mobile using Slack.'''
3
import slack
4
import os
5
-def slack_message(message):
+def slack_message(message, filename):
6
token = os.environ.get('SLACK_TOKEN')
7
sc = slack.WebClient(token)
8
sc.chat_postMessage(channel= 'python-notifications',
9
- text=message,
+ text= '<< ' + os.path.basename(filename) + ' >>\n\n' + message,
10
username= 'Python-Script',
11
icon_emoji= ':sunglasses:')
12
13
+ print('\n***** SLACK Push Notification Successfully Sent. *****\n')
0 commit comments