This commit is contained in:
2026-04-23 04:04:31 +02:00
parent 3cc89177f6
commit 30262c3b8d
417 changed files with 61615 additions and 33 deletions

View File

@@ -1,3 +1,18 @@
const { startAuthServer } = require("./twitch/authServer");
const { connect } = require("./twitch/websocket");
connect();
const auth = startAuthServer();
// wait until token exists before starting twitch
const waitForToken = setInterval(() => {
const token = auth.getToken();
if (token) {
clearInterval(waitForToken);
process.env.APP_ACCESS_TOKEN = token;
console.log("🚀 Starting Twitch connection...");
connect();
}
}, 1000);