properly updated connected variable

This commit is contained in:
bingus_violet 2024-06-25 01:05:18 -05:00
parent 74f2911244
commit ae1397d84a

2
api.js
View file

@ -29,6 +29,7 @@ function socketeer() {
lanyard.on("close", () => {
console.log("Connection Closed. Attempting Reconnect in 30 seconds.")
module.exports.lanyard = constants.fallbackLanyard
module.exports.connected = false
setTimeout(() => {
socketeer()
}, 30000);
@ -52,6 +53,7 @@ function socketeer() {
// console.log(data.op)
if (data.op == 1) {
console.log("Connected to Discord Websocket!")
module.exports.connected = true
ping(30000)
lastPong = Date.now()
} else if (data.op == 3) {