https://github.com/node-ci/nci-telegram-notification
Telegram notification plugin for nci
https://github.com/node-ci/nci-telegram-notification
Last synced: 7 months ago
JSON representation
Telegram notification plugin for nci
- Host: GitHub
- URL: https://github.com/node-ci/nci-telegram-notification
- Owner: node-ci
- License: mit
- Created: 2016-06-08T16:07:33.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-04-20T14:41:14.000Z (almost 6 years ago)
- Last Synced: 2025-06-14T16:02:52.384Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nci-telegram-notification
Telegram notification plugin for [nci](https://github.com/node-ci/nci)
[](https://www.npmjs.org/package/nci-telegram-notification)
[](https://travis-ci.org/node-ci/nci-telegram-notification)
[](https://snyk.io/test/npm/nci-telegram-notification)
## Installation
```sh
npm install nci-telegram-notification
```
## Usage
Register telegram bot, just start conversation with `@BotFather`.
Add this plugin to the `plugins` section at server config, set
parameters for telegram bot at `notify.telegram`
```yml
plugins:
- nci-telegram-notification
notify:
telegram:
token: 123:xyz
```
after that you can set telegram notification at project config
```yml
notify:
on: [done, change, error]
to:
telegram:
- 1111 # this is id of the group chat, read next section
```
### How to get the group chat id
_Information from [stackoverflow question](https://stackoverflow.com/questions/32423837/telegram-bot-how-to-get-a-group-chat-id)_
* Add the Telegram BOT to the group.
* Get the list of updates for your BOT: `curl https://api.telegram.org/bot123:xyz/getUpdates`
* Look for the "chat" object:
```json
{"update_id":8393,"message":{"message_id":3,"from":{"id":7474,"first_name":"AAA"},"chat":{"id":123,"title":""},"date":25497,"new_chat_participant":{"id":71,"first_name":"NAME","username":"YOUR_BOT_NAME"}}}
```
* Use the `id` of the `chat` object to send your messages.
### Usage with SOCKS5 proxy
In order to use proxy for teleram requests you can specify
`notify.telegram.proxy` section in server config:
```yml
plugins:
- nci-telegram-notification
notify:
telegram:
token: 123:xyz
proxy:
host: example.proxy.com
port: 443
username: proxy_username
password: proxy_password
```
## License
[The MIT License](https://raw.githubusercontent.com/fleg/nci-telegram-notification/master/LICENSE)