コード例 #1
0
 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();
 }
コード例 #2
0
ファイル: AskCommand.cs プロジェクト: essenbee/essenbee-bot
 public AskCommand(IBot bot)
 {
     _bot          = bot;
     _searchEngine = bot.AnswerSearchEngine;
     Cooldown      = TimeSpan.FromMinutes(1);
 }