class

CRE::Notifiers::TelegramBot

Inherits Reference < Object

TelegramBot does long-polling getUpdates and dispatches commands to operator handlers. Two ACL tiers:

  • viewer : read-only commands (/status, /queue, /history, /alerts, /help)
  • operator: viewer + mutating commands (/rotate, /snooze)

Authorization is by chat_id; not strictly authentication but adequate for a single-tenant deployment where the bot token + chat IDs live in env vars.

Constants

Log = ::Log.for("cre.telegram_bot")

Constructors

new(bus : Engine::EventBus, telegram : Telegram, persistence : Persistence::Persistence, viewer_chats : Array(Int64), operator_chats : Array(Int64))
Source

Instance methods

authorized_operator?(chat_id : Int64) : Bool
Source
authorized_viewer?(chat_id : Int64) : Bool
Source
handle_command(chat_id : Int64, text : String) : String
Source
poll_once
Source
start
Source
stop
Source