This commit is contained in:
Christopher Cookman 2023-05-19 19:11:59 -06:00
parent eafc323803
commit 0f30ae9bb3
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -149,8 +149,10 @@ function updateStatus(addr, port, msg) {
"gameId": "573090"
}
}
console.log(`${colors.magenta(`[DEBUG ${new Date()}]`)} Checking ${addr}:${port}`);
checkServer(`${addr}:${port}`).then((data) => {
if (data.status) {
console.log(`${colors.magenta(`[DEBUG ${new Date()}]`)} ${addr}:${port} is online.`);
serverStatus[`${addr}:${port}`] = data;
embed = {
"title": data.name,
@ -193,6 +195,7 @@ function updateStatus(addr, port, msg) {
console.log(err)
});
} else {
console.log(`${colors.magenta(`[DEBUG ${new Date()}]`)} ${addr}:${port} is offline.`);
// Server is offline, modify embed slightly and edit it
data2 = serverStatus[`${addr}:${port}`];
embed = {