1.2.2 • Published 6 years ago
nci-telegram-notification v1.2.2
nci-telegram-notification
Telegram notification plugin for nci
Installation
npm install nci-telegram-notificationUsage
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
plugins:
- nci-telegram-notification
notify:
telegram:
token: 123:xyzafter that you can set telegram notification at project config
notify:
on: [done, change, error]
to:
telegram:
- 1111 # this is id of the group chat, read next sectionHow to get the group chat id
Information from stackoverflow question
Add the Telegram BOT to the group.
Get the list of updates for your BOT:
curl https://api.telegram.org/bot123:xyz/getUpdatesLook for the "chat" object:
{"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
idof thechatobject 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:
plugins:
- nci-telegram-notification
notify:
telegram:
token: 123:xyz
proxy:
host: example.proxy.com
port: 443
username: proxy_username
password: proxy_password