fix/player list not showing all connected players for multiple servers
This commit is contained in:
1 parent
daa87574e1
commit
49021e3ad3
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dayzr-bot",
|
"name": "dayzr-bot",
|
||||||
"version": "13.1.11",
|
"version": "13.1.12",
|
||||||
"description": "A General Purpose Discord Bot for DayZ Nitrado Servers.",
|
"description": "A General Purpose Discord Bot for DayZ Nitrado Servers.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"nodemonConfig": {
|
"nodemonConfig": {
|
||||||
|
|||||||
+1
-1
@@ -227,7 +227,7 @@ 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({"connected": true}).toArray();
|
let activePlayers = await client.dbo.collection("players").find({"nitradoServerID": nitrado_cred.ServerID}).toArray().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++) {
|
||||||
|
|||||||
Reference in new issue
Block a user