Skip to content

tpcybersec/TP-sendNotify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/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>"
        },
        ...
    }
}

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")

toSlack(bot_name, message, ConfigFile=None)

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")

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages