Skip to content

serp-dev/nci-telegram-notification

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nci-telegram-notification

Build Status

Telegram notification plugin for nci

Installation

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

plugins:
    - nci-telegram-notification

notify:
    telegram:
        token: 123:xyz

after 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 section

How 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/123:xyz/getUpdates

  • Look 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 id of the chat object to send your messages.

License

The MIT License

About

Telegram notification plugin for nci

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%