https://github.com/seanghay/tgnotify
A simple utility command to send message to Telegram via CLI. This can be handy if you have a long running task and want to know when it's done.
https://github.com/seanghay/tgnotify
node nodejs telegram telegram-bot
Last synced: about 1 month ago
JSON representation
A simple utility command to send message to Telegram via CLI. This can be handy if you have a long running task and want to know when it's done.
- Host: GitHub
- URL: https://github.com/seanghay/tgnotify
- Owner: seanghay
- License: apache-2.0
- Created: 2023-05-13T07:52:12.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-13T09:20:07.000Z (about 3 years ago)
- Last Synced: 2025-02-24T13:18:59.748Z (over 1 year ago)
- Topics: node, nodejs, telegram, telegram-bot
- Language: JavaScript
- Homepage:
- Size: 112 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
`tgnotify` A simple utility command to send message to Telegram via CLI. This can be handy if you have a long running task and want to know when it's done.
```shell
python3 train.py && tgnotify -m "Done!" \
-i \
-t
```
## Installation
```
npm install -g tgnotify@latest
```
### Help
```
Usage
$ tgnotify
Options
--message, -m Message to send.
--token, -t Telegram bot token.
--id, -i Chat/Channel ID to send the message to.
--parse-mode, -p Message parse mode. (HTML, Markdown, MarkdownV2)
--verbose, -v Print debug messages
Examples
$ tgnotify listen - to listen for ChatID by sending /id command to the bot.
```
## Environment
You can also use `.env` with the content below.
```shell
TGNOTIFY_TOKEN=
TGNOTIFY_CHAT_ID=
TGNOTIFY_MESSAGE="Hello, *World*"
TGNOTIFY_PARSE_MODE="Markdown"
```