From 692f0e087556f8ff28752b83b21262fd7c88267d Mon Sep 17 00:00:00 2001 From: Rikitav Date: Sat, 2 Aug 2025 03:36:48 +0400 Subject: [PATCH] * README tweaks --- README.md | 9 ++++++--- Telegrator.Hosting.Web/README.md | 6 +++++- Telegrator.Hosting/README.md | 1 - 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e5ab0ec..8c1bc8c 100644 --- a/README.md +++ b/README.md @@ -55,9 +55,10 @@ using Telegrator.Annotations; [MessageHandler] public class HelloHandler : MessageHandler { - public override async Task Execute(IAbstractHandlerContainer container, CancellationToken cancellation) + public override async Task Execute(IAbstractHandlerContainer container, CancellationToken cancellation) { await Reply("Hello, world!", cancellationToken: cancellation); + return Result.Ok(); } } @@ -77,9 +78,10 @@ using Telegrator.Annotations; [CommandHandler, CommandAllias("start", "hello"), ChatType(ChatType.Private)] public class StartCommandHandler : CommandHandler { - public override async Task Execute(IAbstractHandlerContainer container, CancellationToken cancellation) + public override async Task Execute(IAbstractHandlerContainer container, CancellationToken cancellation) { await Responce("Welcome!", cancellationToken: cancellation); + return Result.Ok(); } } @@ -96,11 +98,12 @@ using Telegrator.Annotations; [CommandHandler, CommandAllias("first"), NumericState(SpecialState.NoState)] public class StateKeepFirst : CommandHandler { - public override async Task Execute(IAbstractHandlerContainer container, CancellationToken cancellation) + public override async Task Execute(IAbstractHandlerContainer container, CancellationToken cancellation) { container.CreateNumericState(); container.ForwardNumericState(); await Reply("first state moved (1)", cancellationToken: cancellation); + return Result.Ok(); } } diff --git a/Telegrator.Hosting.Web/README.md b/Telegrator.Hosting.Web/README.md index 3635afa..1a18ae7 100644 --- a/Telegrator.Hosting.Web/README.md +++ b/Telegrator.Hosting.Web/README.md @@ -40,7 +40,6 @@ using Telegrator.Hosting.Web; TelegramBotWebHostBuilder builder = TelegramBotWebHost.CreateBuilder(new TelegramBotWebOptions() { Args = args, - WebhookUri = "https://you-public-host.ru/bot" ExceptIntersectingCommandAliases = true }); @@ -66,6 +65,11 @@ telegramBot.Run(); "TelegramBotClientOptions": { "Token": "YOUR_BOT_TOKEN" } + + "TelegratorWebOptions": { + "WebhookUri" = "https://you-public-host.ru/bot", + "DropPendingUpdates": true + } } ``` diff --git a/Telegrator.Hosting/README.md b/Telegrator.Hosting/README.md index 41917e4..7dd686e 100644 --- a/Telegrator.Hosting/README.md +++ b/Telegrator.Hosting/README.md @@ -38,7 +38,6 @@ using Telegrator.Hosting; TelegramBotHostBuilder builder = TelegramBotHost.CreateBuilder(new TelegramBotHostBuilderSettings() { Args = args, - DescendDescriptorIndex = false, ExceptIntersectingCommandAliases = true });