Добавлен метод удаления сообщения
All checks were successful
CI / build-test (push) Successful in 48s
Release / pack-and-publish (release) Successful in 51s

This commit is contained in:
FrigaT
2026-01-13 20:23:38 +03:00
parent 0089926fb0
commit f29e72a6f2
5 changed files with 50 additions and 18 deletions

View File

@@ -137,6 +137,18 @@ public sealed class TelegramAdapter : IMessengerAdapterSetup
return null;
}
/// <inheritdoc/>
public Task DeleteAsync(string chatId, string messageId, CancellationToken ct = default)
{
if (_client is null)
{
_logger.Log(LogLevel.Critical, $"{MessengerType} client is not initialized.");
return null;
}
return _client.DeleteMessage(chatId, Convert.ToInt32(messageId), ct);
}
// --- Helpers ---
private InlineKeyboardMarkup? BuildInlineMarkup(IEnumerable<IEnumerable<InlineButton>>? inline)