/
Laxerem
/
BaskBot
Обзор
Документация
Войти
/
Laxerem
/
BaskBot
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
BaskBot.Application/Bot/Controllers/CommandController.cs
17 строк
519 B
Laxerem
[MODIFED]: Add commands as DI scope
04 янв 2026, 19:18
04 янв 2026, 19:18
ebc8ad8
Код
Авторство
О чём код?
using BaskBot.Application.Bot.Commands; using BaskBot.Application.Bot.External.Events; using Telegram.Bot; namespace BaskBot.Application.Bot.Controllers; public class CommandController { private readonly CommandContext _context; public CommandController(CommandContext context) { _context = context; } public async Task HandleCommand(ITelegramBotClient botClient, MessageUserEvent evt, string commandName) { await _context.FindAndExecute(commandName, botClient, evt); } }