Skip to main content
Corvus Connection

ITelegramApi

Interface
TheOmenDen.StreamPulse.Scripting.ITelegramApiOutbound Telegram send operations available inside a script handler (spec 055), bound to the local Telegram bot connection. Every method is failure-safe: a disconnected bot, an unknown target, a rate limit, or an unexpected throw is logged (a stable message only, never message content or the token) and surfaced as a benign no-op. A failing call can never propagate out of a node.

Members

4
  • SendAsync
    method
    Task SendAsync(string target, string text, TelegramSendOptions options = default, CancellationToken cancellationToken = default)
    Sends HTML-formatted text to a channel/group (a saved target name or a raw @username / numeric chat_id). Blank text no-ops. Best-effort: throttled, and dropped with a health event on failure.
  • SendDmAsync
    method
    Task SendDmAsync(string recipient, string text, TelegramSendOptions options = default, CancellationToken cancellationToken = default)
    Sends HTML-formatted text as a direct message (a saved DM target name or a user id). The recipient must have /start-ed the bot (bots cannot initiate), otherwise it drops with a clear health event.
  • IsConnected
    property
    bool IsConnected
    True when the bot is logged in and the connection is live.
  • Targets
    property
    IReadOnlyList<string> Targets
    The saved target names the streamer configured (for reference / discovery).