public void Startup()
        {
            var schedulerTask = StdSchedulerFactory.GetDefaultScheduler();

            schedulerTask.Wait();
            IScheduler scheduler = schedulerTask.Result;

            scheduler.Start();

            TheBot.Startup();
            if (TheConfiguration.ManagerChatId.Identifier != 0)
            {
                TheBot.SendAdminMessage(TheConfiguration.ManagerChatId, "서비스가 시작되었습니다");
            }
        }
Exemplo n.º 2
0
        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, "서비스가 시작되었습니다");
            }
        }