public ResponseMessageQueue(NotifierBot bot) : base("BotMessageQueue") { Bot = bot; Locker = new object(); ResponseQueue = new Queue <ResponseMessage>(); }
public KidsNoteNotifierManager(HashSet <ContentType> monitoringTypes) { ActiveScheduleNames = new HashSet <string>(); MonitoringTypes = monitoringTypes; TheConfiguration = GetConfiguration(); FileLogger.Singleton.UseLogger = this.UseLogger; FileLogger.Singleton.WriteLog("Config path : " + SetupFilePath()); LastErrorTime = DateTime.MinValue; TheBot = new Bot.NotifierBot(TheConfiguration.TelegramBotToken); TheBot.AdminUserChatId = this.AdminUserChatId; TheBot.AddSubscriber = this.AddSubscriber; }
public void Startup() { if (TheBot == null) { TheBot = new Bot.NotifierBot(TheConfiguration.TelegramBotToken); TheBot.AdminUserChatId = this.AdminUserChatId; TheBot.AddSubscriber = this.AddSubscriber; TheBot.AllNotificationsSent = this.AllNotificationsSent; TheBot.SendImagesAsAttachment = this.SendImagesAsAttachment; } var schedulerTask = StdSchedulerFactory.GetDefaultScheduler(); schedulerTask.Wait(); IScheduler scheduler = schedulerTask.Result; scheduler.Start(); TheBot.Startup(); if (TheConfiguration.ManagerChatId.Identifier != 0) { TheBot.SendAdminMessage(TheConfiguration.ManagerChatId, "서비스가 시작되었습니다"); } }