rsudp.c_telegram (Telegram alerts)

class rsudp.c_telegram.Telegrammer(token, chat_id, testing=False, q=False, send_images=False, extra_text=False, sender='Telegram')

Added in version 0.4.2.

Telegram is a free messaging service which, among other things, is suited to quickly broadcasting automatic notifications via an API. It is used by the Mexican Early Warning System (SASMEX) and PanamaIGC.

Parameters:
  • token (str) – bot token from Telegram bot creation

  • chat_id (str) – Telegram chat ID number that this module will post to

  • send_images (bool) – whether or not to send images. if False, only alerts will be sent.

  • extra_text (bool or str) – Approximately 3900 additional characters to post as part of the Telegram message (Telegram message limits are 4096 characters). Longer messages will be truncated.

  • q (queue.Queue) – queue of data and messages sent by rsudp.c_consumer.Consumer

run()

Reads data from the queue and sends a message if it sees an ALARM or IMGPATH message


Back to top ↑