Sending message notification to Discord, Telegram
Project description
TP-sendNotify
Installation
From PyPI:
pip install TP-sendNotify
From Source:
git clone https://github.com/truocphan/TP-sendNotify.git --branch <Branch/Tag>
cd TP-sendNotify
python setup.py build
python setup.py install
Basic Usage
The default configuration file created at ~/.TPConfig/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>"
},
...
}
}
toDiscord(bot_name, message, SidebarColor=0xcc0500, ConfigFile=None)
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")
toTelegram(bot_name, message, MessageFormat=None, ConfigFile=None)
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")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file TP-sendNotify-2024.8.28.tar.gz
.
File metadata
- Download URL: TP-sendNotify-2024.8.28.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ec2e80af53fa8cc4b82d6e52736047e1899ff3738f87c469d8d46c8dd472921 |
|
MD5 | 4f23b49a413d66bc5e5c0c8c9864838b |
|
BLAKE2b-256 | 0afcbebe031d55ee0526edb0f75e687d907605572da5c1f435942d50c20f85ad |
File details
Details for the file TP_sendNotify-2024.8.28-py3-none-any.whl
.
File metadata
- Download URL: TP_sendNotify-2024.8.28-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2952c3fd4b1c87206887e1fa8667856cbd0a1ed8668aab78bb64121734642bf3 |
|
MD5 | 0b265b36192ca3f0ce1aa778176ec1af |
|
BLAKE2b-256 | ae05ad891f1bbc9433f2641abdfe80bfd73a255b296b7077fc015751c832941a |
File details
Details for the file TP_sendNotify-2024.8.28-py2-none-any.whl
.
File metadata
- Download URL: TP_sendNotify-2024.8.28-py2-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7bd6f3d680c1a7c1ea3fccb1b17190846f2977192a9a00fd8f6c46942d0a3e4 |
|
MD5 | 1420c6aac48d24640f2ae5c74a49cb03 |
|
BLAKE2b-256 | 4b1f454804691585bd952a759602dfe12d5d94e351f83c42b62d46dbae471f32 |