Class TelegramEndpointOptions

Assembly: redb.Route.Telegram.dll

Typed options for .
Bound from URI query parameters via reflection (EndpointOptions.BindFromUri).
Consumer URI: telegram://receive?token=TOKEN
Producer URI: telegram://send?token=TOKEN&chatId=123456&parseMode=HTML
Document URI: telegram://document?token=TOKEN&chatId=123456&fileName=report.pdf

public sealed class TelegramEndpointOptions : EndpointOptions

Inheritance

Object→EndpointOptions→TelegramEndpointOptions

Inherited Members

Properties

BodyIsFileId

When true, treats a string exchange body as a Telegram file_id

public bool BodyIsFileId { get; set; }

Caption

Caption for document/photo messages. Supports expressions.

public string? Caption { get; set; }

ChatId

Target chat ID or username (.

public string? ChatId { get; set; }

ConnectionFactory

Named from the route registry. Lets the bot token

[RegistryReference(typeof(TelegramConnectionFactory))]
public string? ConnectionFactory { get; set; }

DisableNotification

Send message silently (no notification sound). Default false.

public bool DisableNotification { get; set; }

FileId

Which file the download mode fetches. Supports expressions, resolved per

public string? FileId { get; set; }

FileName

File name for document sends (when body is Stream or byte[]).

public string? FileName { get; set; }

MaxDownloadBytes

Ceiling on a download, in bytes. Default 20 MiB — the Bot API's own limit for

public long MaxDownloadBytes { get; set; }

MessageId

Message to edit / delete. Supports expressions, resolved per message:

public string? MessageId { get; set; }

ParseMode

Parse mode for message text: HTML, Markdown, MarkdownV2.

public string? ParseMode { get; set; }

ReplyToMessageId

Message to reply to. Supports expressions, resolved per message:

public string? ReplyToMessageId { get; set; }

SendTimeoutSeconds

Per-send timeout in seconds for producer calls (send / document / photo / edit / delete / answer).

public int SendTimeoutSeconds { get; set; }

ShowAlert

In answer mode, show the text as a modal alert instead of a toast

public bool ShowAlert { get; set; }

Token

Bot token from .

public string Token { get; set; }

Methods

ResolveTokenExpression(string)

Resolves ${env:NAME} expressions inside a token value at endpoint

public static string ResolveTokenExpression(string raw)

Validate()

Validates required parameters and constraints. Called after BindFromUri.

public override void Validate()