Class TgBuilder

Assembly: redb.Route.Telegram.dll

Fluent builder for Telegram endpoint URIs.
Builds a URI consumed by .
Pattern mirrors KafkaDsl / RabbitMQ Rabbit builder.

public sealed class TgBuilder

Inheritance

Object→TgBuilder

Methods

BodyIsFileId(bool)

Treat a string exchange body as a Telegram file_id (document/photo) instead of uploading.

public TgBuilder BodyIsFileId(bool value = true)

Build()

Builds the telegram:// URI string.

public string Build()

Caption(IExpression)

Caption from an expression.

public TgBuilder Caption(IExpression expr)

Caption(string)

Caption for document/photo messages.

public TgBuilder Caption(string text)

ChatId(IExpression)

Target chat ID from an expression (e.g. Header("telegram.chatId")).

public TgBuilder ChatId(IExpression expr)

ChatId(long)

Target chat ID (long) or .

public TgBuilder ChatId(long id)

ConnectionFactory(string)

References a named from the route registry instead of

public TgBuilder ConnectionFactory(string name)

DisableNotification(bool)

Send silently (no sound notification). Default false.

public TgBuilder DisableNotification(bool value = true)

FileId(IExpression)

Which file to download, from an expression resolved per message — e.g.

public TgBuilder FileId(IExpression expr)

FileId(string)

Which file to download, by file_id.

public TgBuilder FileId(string fileId)

FileName(IExpression)

File name from an expression (e.g. Header("telegram.fileName")).

public TgBuilder FileName(IExpression expr)

FileName(string)

File name for document sends.

public TgBuilder FileName(string name)

MaxDownloadBytes(long)

Ceiling on a download, in bytes; 0 lifts it. Default 20 MiB — the Bot API's own

public TgBuilder MaxDownloadBytes(long bytes)

MessageId(IExpression)

Message to edit / delete, from an expression resolved per message

public TgBuilder MessageId(IExpression expr)

MessageId(long)

Message to edit / delete, by id.

public TgBuilder MessageId(long id)

ParseMode(string)

Parse mode: "HTML", "Markdown", "MarkdownV2". Default: plain text.

public TgBuilder ParseMode(string mode)

ReplyTo(IExpression)

Reply target from an expression, resolved per message

public TgBuilder ReplyTo(IExpression expr)

ReplyTo(long)

Reply to a specific message id (send/document/photo).

public TgBuilder ReplyTo(long messageId)

ReplyToIncoming()

Replies to the incoming message. Sugar for with the

public TgBuilder ReplyToIncoming()

ShowAlert(bool)

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

public TgBuilder ShowAlert(bool value = true)

Timeout(int)

Per-send timeout in seconds for producer calls (1–600). Default 120. Not used by receive.

public TgBuilder Timeout(int seconds)