text: try {
      require("dotenv").config();
  }
  catch {
      console.warn("Not using dotenv. Make sure environment variables are set");
  }
  
  const clearUnauth = require("./utils/clearUnauth");
  const syncDb = require("./utils/syncDb");
  
  // Sync database before anything else
  syncDb()
      .then(() => clearUnauth())
      .then(() => {
          function failed() {
              process.exit();
          }
  
          // Connect to Discord before start web server
          process.bot = require("./bot");
  
          process.bot.on("ready", () => {
              process.bot.off("error", failed);
              process.server = require("./server");
          });
  
          process.bot.on("error", failed);
      })
      .catch(err => {
          console.error(err);
          process.exit();
      });
  