예제 #1
0
파일: EveBot.cs 프로젝트: etherealko/Eve
        public EveBot()
        {
            var db = new EveDb();

            _currentSpace = db.EveSpaces.Single(s => s.IsActive); //only single space is supported now

            _updater = new BotUpdatePoller(_currentSpace.BotApiAccessToken);
            _outgoingApi = new TelegramBotApi(_currentSpace.BotApiAccessToken);

            _mainThread = new Thread(UpdateProc);
        }
예제 #2
0
 public BotUpdatePoller(string token)
 {
     _api = new TelegramBotApi(token) { HttpClientTimeout = TimeSpan.FromSeconds(30) };
 }