Добавлен вывод кнопок для файлов
All checks were successful
CI / build-test (push) Successful in 31s
Release / pack-and-publish (release) Successful in 31s

This commit is contained in:
2025-12-07 08:26:45 +03:00
parent db122e8aef
commit d6f54bb0e6
6 changed files with 93 additions and 33 deletions

View File

@@ -123,19 +123,25 @@ public sealed class MessageBuilder
{
string? messageId = null;
List<List<ReplyButton>>? reply = null;
if (_disableReplyKeyboard) reply = new();
else if (_reply.Any()) reply = _reply;
// Текст
if (!string.IsNullOrWhiteSpace(_text))
{
List<List<ReplyButton>>? reply = null;
if (_disableReplyKeyboard) reply = new();
else if (_reply.Any()) reply = _reply;
messageId = await _ctx.SendTextAsync(_text, _format, _inline, reply, _editMessageId, ct);
}
// Файлы
foreach (var (file, caption, captionFormat) in _files)
await _ctx.SendFileAsync(file, caption, captionFormat, ct);
await _ctx.SendFileAsync(file: file
, caption: caption
, captionFormat: captionFormat
, reply: reply
, inline: _inline
, ct: ct
);
// Альбом
if (_album.Count > 0)