Skip to content

Configure Telegram in able to receive notification

HungPV edited this page Sep 27, 2021 · 5 revisions

(Optional)

This bot supports pushing notification via Telegram, this is how to do it

  1. Register a Telegram account (if you don't have it)
  2. Talk to Bot Father as described here and follow a few simple steps. Once you've created a bot and received your authorization token (for example 9999999999:XXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXX), fill it into the telegram.token key on user-config.properties file. For example: telegram.token=9999999999:XXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXX
  3. Create a private Telegram channel, find the channel id. Here is a stackoverflow topic about it. One found it, fill it into telegram.channel-id key on user-config.properties.
  4. Save change

Later on, if you want to disable Telegram, you can choose one of the following ways:

  1. Remove either value of the telegram keys on user-config.properties
  2. Provide --mute flag when running program

P/s: from 1.7.3, there is new key added telegram.instance-id. In case you run bot on multiple machines (for multiple accounts purpose), you can give a value to this flag, it will be added to telegram message so you will know which machine sent this message. For example you filled value boo into this case: telegram.instance-id=boo so all Telegram messages from this boo machine will look like: [AFK:boo] Finished