
import { AppDataSource, appDataSourceReady } from "./data_source.js";
import checkFeeds from "./feed_fetcher.js";
import Logging from "./log.js";
import { User } from "./models/User.js";
import bot from "./telegram.js";

appDataSourceReady.then(() => {
   return Promise.allSettled([
      bot.launch({}),
      checkFeeds()
   ])
}).then(() => {
   Logging.info("Exiting...");
}).catch(err => {
   Logging.error(err);
   process.exit(1);
});