debug online list

This commit is contained in:
SowinskiBraeden committed 2023-04-23 11:46:50 -07:00
1 parent 4a079869d6
commit ab0cd7fe67
4 files changed
+39 -22

No files matched your search

+1 -8
View File
@@ -32,7 +32,6 @@ module.exports = {
let newDt = await client.getDateEST(info.time);
playerStat.lastConnectionDate = newDt;
playerStat.connected = true;
if (playerStatIndex == -1) stats.push(playerStat);
else stats[playerStatIndex] = playerStat;
@@ -59,13 +58,7 @@ module.exports = {
if (!client.exists(info.player) || !client.exists(info.playerID)) return stats;
let playerStat = stats.find(stat => stat.playerID == info.playerID)
let playerStatIndex = stats.indexOf(playerStat);
if (playerStat == undefined) playerStat = client.getDefaultPlayerStats(info.player, info.playerID);
playerStat.connected = false;
if (playerStatIndex == -1) stats.push(playerStat);
else stats[playerStatIndex] = playerStat;
SendConnectionLogs(client, guildId, {
time: info.time,
@@ -155,7 +148,7 @@ module.exports = {
const channel = client.channels.cache.get(guild.activePlayersChannel);
let activePlayers = guild.playerstats.filter(p => p.connected);
let activePlayers = guild.playerstats.filter(p => p.connected == true);
if (activePlayers.length == 0) return;