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);
        }
    }
}