Files
managing-apps/src/Managing.Application/ManageBot/StopBotCommandHandler.cs
2024-07-12 22:21:49 +07:00

21 lines
585 B
C#

using Managing.Application.Abstractions;
using Managing.Application.ManageBot.Commands;
using MediatR;
namespace Managing.Application.ManageBot
{
public class StopBotCommandHandler : IRequestHandler<StopBotCommand, string>
{
private readonly IBotService _botService;
public StopBotCommandHandler(IBotService botService)
{
_botService = botService;
}
public Task<string> Handle(StopBotCommand request, CancellationToken cancellationToken)
{
return _botService.StopBot(request.Name);
}
}
}