using Managing.Application.Abstractions; using Managing.Application.ManageBot.Commands; using Managing.Domain.Bots; using MediatR; namespace Managing.Application.ManageBot { public class GetBotsByUserAndStatusCommandHandler(IBotService botService) : IRequestHandler> { public async Task> Handle(GetBotsByUserAndStatusCommand request, CancellationToken cancellationToken) { // Get all bots for the user var userBots = await botService.GetBotsByUser(request.UserId); // Filter by status return userBots.Where(bot => bot.Status == request.Status); } } }