Убраны старые api
This commit is contained in:
@@ -26,7 +26,13 @@ namespace Demo
|
||||
{
|
||||
if (args is null || !args.TryGetValue("page", out var pageName))
|
||||
{
|
||||
await ctx.SendTextAsync("Не указана страница для открытия.", ct: ct);
|
||||
var req = new BotPages.Core.Abstractions.SendRequest
|
||||
{
|
||||
ChatId = ctx.Update.Chat.Id,
|
||||
Text = "Не указана страница для открытия."
|
||||
};
|
||||
|
||||
await ctx.SendAsync(req, ct: ct);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -37,7 +43,7 @@ namespace Demo
|
||||
var app = new BotPagesApp(state, logger)
|
||||
.AddDefaultPage<WelcomePage>()
|
||||
.MapCommand<WelcomePage>("/start", true, "Главная")
|
||||
.MapCommand("/open {page}", openHandler, true, "открыть станицу /open {page}")
|
||||
.MapCommand("/open {page}", openHandler, true, "открыть страницу /open {page}")
|
||||
.MapCommand(DetailsPage.Command, DetailsPage.CommandHandler, true, DetailsPage.CommandDescription)
|
||||
.AutoMapRoute()
|
||||
.AddMiddleware(new ErrorHandlingMiddleware(logger))
|
||||
|
||||
Reference in New Issue
Block a user