Доработан обработчик команд. Добавлена публикация команд
All checks were successful
CI / build-test (push) Successful in 31s
Release / pack-and-publish (release) Successful in 35s

This commit is contained in:
2025-12-07 10:09:59 +03:00
parent 8af03fa52b
commit edc718b1f9
9 changed files with 127 additions and 17 deletions

View File

@@ -0,0 +1,34 @@
namespace BotPages.Core.Routing;
using System.Text.RegularExpressions;
/// <summary>
/// Команда действий. Например "/start"
/// </summary>
public class Command
{
/// <summary>
/// Название команды.
/// </summary>
public required string Name { get; init; }
/// <summary>
/// Шаблон команды.
/// </summary>
public required Regex Pattern { get; init; }
/// <summary>
/// Обработчик команды.
/// </summary>
public required CommandHandler Handler { get; init; }
/// <summary>
/// Описание команды.
/// </summary>
public string? Description { get; init; }
/// <summary>
/// Публичный? нужно ли регистрировать в боте.
/// </summary>
public required bool Publish { get; init; }
}