pip install TP-sendNotify
git clone https://github.com/truocphan/TP-sendNotify.git --branch <Branch/Tag>
cd TP-sendNotify
python setup.py build
python setup.py install
The default configuration file created at ~/.TPConfig/TP-sendNotify/sendNotify.json
has the following content:
{
"Discord": {
"<BOT_NAME>": {
"WEBHOOK-URL": "https://discord.com/api/webhooks/<WEBHOOK_ID>/<WEBHOOK_TOKEN>"
},
...
},
"Telegram": {
"<BOT_NAME>": {
"BOT-TOKEN": "<BOT_TOKEN>",
"CHANNEL-USERNAME": "<CHANNEL_USERNAME>"
},
...
},
"Slack": {
"<BOT_NAME>": {
"WEBHOOK-URL": "https://hooks.slack.com/services/<WORKSPACE_ID>/<CHANNEL_ID>/<TOKEN>"
},
...
}
}
Sending message notification to Discord
import TP_sendNotify
TP_sendNotify.toDiscord("<BOT_NAME>", "This message notification has been sent to the Discord using TP-sendNotify")
Sending message notification to Telegram
import TP_sendNotify
TP_sendNotify.toTelegram("<BOT_NAME>", "This message notification has been sent to the Telegram using TP-sendNotify")
Sending message notification to Slack
import TP_sendNotify
TP_sendNotify.toSlack("<BOT_NAME>", "This message notification has been sent to the Slack using TP-sendNotify")