swaws
This commit is contained in:
parent
eafc323803
commit
0f30ae9bb3
3
index.js
3
index.js
|
@ -149,8 +149,10 @@ function updateStatus(addr, port, msg) {
|
||||||
"gameId": "573090"
|
"gameId": "573090"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log(`${colors.magenta(`[DEBUG ${new Date()}]`)} Checking ${addr}:${port}`);
|
||||||
checkServer(`${addr}:${port}`).then((data) => {
|
checkServer(`${addr}:${port}`).then((data) => {
|
||||||
if (data.status) {
|
if (data.status) {
|
||||||
|
console.log(`${colors.magenta(`[DEBUG ${new Date()}]`)} ${addr}:${port} is online.`);
|
||||||
serverStatus[`${addr}:${port}`] = data;
|
serverStatus[`${addr}:${port}`] = data;
|
||||||
embed = {
|
embed = {
|
||||||
"title": data.name,
|
"title": data.name,
|
||||||
|
@ -193,6 +195,7 @@ function updateStatus(addr, port, msg) {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
console.log(`${colors.magenta(`[DEBUG ${new Date()}]`)} ${addr}:${port} is offline.`);
|
||||||
// Server is offline, modify embed slightly and edit it
|
// Server is offline, modify embed slightly and edit it
|
||||||
data2 = serverStatus[`${addr}:${port}`];
|
data2 = serverStatus[`${addr}:${port}`];
|
||||||
embed = {
|
embed = {
|
||||||
|
|
Loading…
Reference in a new issue