Class TgBuilder
Fluent builder for Telegram endpoint URIs.
Builds a URI consumed by .
Pattern mirrors KafkaDsl / RabbitMQ Rabbit builder.
public sealed class TgBuilder
Inheritance
Methods
BodyIsFileId(bool)
Treat a string exchange body as a Telegram file_id (document/photo) instead of uploading.
public TgBuilder BodyIsFileId(bool value = true)
ChatId(IExpression)
Target chat ID from an expression (e.g. Header("telegram.chatId")).
public TgBuilder ChatId(IExpression expr)
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)
FileName(IExpression)
File name from an expression (e.g. Header("telegram.fileName")).
public TgBuilder FileName(IExpression expr)
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)
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)