public Bot(IActionScheduler actionScheduler, IAnswerSearchEngine answerSearchEngine, IConnectedClients clients, IBotClient botDataClient, IBotSettings settings) { Settings = settings; ActionScheduler = actionScheduler; AnswerSearchEngine = answerSearchEngine; BotDataClient = botDataClient; AnswerSearchEngine.SetApiKey(Settings.AnswerSearchApiKey); ConnectedClients = clients.ChatClients; CommandHandler = new BotCommandHandler(this); _ = ScheduleRepeatedMessages(); }
public AskCommand(IBot bot) { _bot = bot; _searchEngine = bot.AnswerSearchEngine; Cooldown = TimeSpan.FromMinutes(1); }