fix player online list log
This commit is contained in:
1 file changed
+3
-2
+3
-2
@@ -227,7 +227,8 @@ module.exports = {
|
|||||||
const emojiStatus = Statuses[status].emoji || "❓";
|
const emojiStatus = Statuses[status].emoji || "❓";
|
||||||
const textStatus = Statuses[status].text || "Unknown Status";
|
const textStatus = Statuses[status].text || "Unknown Status";
|
||||||
|
|
||||||
let activePlayers = await client.dbo.collection("players").find({"nitradoServerID": nitrado_cred.ServerID}).toArray().filter(player => player.connected);
|
let activePlayers = await client.dbo.collection("players").find({ "nitradoServerID": parseInt(nitrado_cred.ServerID) }).toArray();
|
||||||
|
activePlayers = activePlayers.filter(player => player.connected);
|
||||||
|
|
||||||
let des = activePlayers.length > 0 ? `` : `**No Players Online**`;
|
let des = activePlayers.length > 0 ? `` : `**No Players Online**`;
|
||||||
for (let i = 0; i < activePlayers.length; i++) {
|
for (let i = 0; i < activePlayers.length; i++) {
|
||||||
@@ -252,7 +253,7 @@ module.exports = {
|
|||||||
.setDescription(des || (nodes ? "No Players Online :(" : ""));
|
.setDescription(des || (nodes ? "No Players Online :(" : ""));
|
||||||
|
|
||||||
const NAME = "DayZ.R Admin Logs";
|
const NAME = "DayZ.R Admin Logs";
|
||||||
const webhook = await GetWebhook(client, NAME, guild.connectionLogsChannel);
|
const webhook = await GetWebhook(client, NAME, guild.activePlayersChannel);
|
||||||
|
|
||||||
let id = client.playerListMsgIds.get(guild.serverID);
|
let id = client.playerListMsgIds.get(guild.serverID);
|
||||||
if (id == "") {
|
if (id == "") {
|
||||||
|
|||||||
Reference in new issue
Block a user