fixed server count in stats

pull/69/head
TheCodedProf 3 years ago
parent ba20ac6efe
commit e4ca514a40

@ -144,13 +144,17 @@ export class Guilds {
} }
async staffChannels(): Promise<string[]> { async staffChannels(): Promise<string[]> {
const entries = await this.guilds const entries = (await this.guilds
.find( .find(
{ "logging.staff.channel": { $exists: true } }, { "logging.staff.channel": { $exists: true } },
{ projection: { "logging.staff.channel": 1, _id: 0 } } { projection: { "logging.staff.channel": 1, _id: 0 } }
) )
.toArray(); .toArray()).map((e) => e.logging.staff.channel);
return entries.map((e) => e.logging.staff.channel!); const out: string[] = [];
for (const entry of entries) {
if (entry) out.push(entry);
}
return out;
} }
} }

Loading…
Cancel
Save