forked from CodAre-Development/discord-chart.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.js
23 lines (22 loc) · 1.38 KB
/
server.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const express = require('express');
const app = express();
const http = require('http');
const Discord = require('discord.js');
let client = new Discord.Client();
app.use(express.static('public'));
app.listen(8000)
app.set('view engine', 'ejs');
app.get('/', function(req, res) {
res.render('index', {
client: client,
aktif:client.guilds.cache.get('sunucuid').members.cache.filter(m => !m.user.bot && (m.user.presence.status !== "offline")).size,
offline: client.guilds.cache.get('sunucuid').members.cache.filter(m => !m.user.bot && (m.user.presence.status == "offline")).size,
mobil: client.guilds.cache.get('sunucid').members.cache.filter(m => !m.user.bot && (m.user.presence.status !== "offline")).filter(m => Object.keys(m.user.presence.clientStatus).includes("web")).size,
web: client.guilds.cache.get('sunucuid').members.cache.filter(m => !m.user.bot && (m.user.presence.status !== "offline")).filter(m => Object.keys(m.user.presence.clientStatus).includes("mobile")).size,
pc: client.guilds.cache.get('sunucuid').members.cache.filter(m => !m.user.bot && (m.user.presence.status !== "offline")).filter(m => Object.keys(m.user.presence.clientStatus).includes("desktop")).size,
bot: client.guilds.cache.get('sunucuid').members.cache.filter(x=>x.user.bot).size,
kişi: client.guilds.cache.get('sunucid').members.cache.filter(x=>!x.user.bot).size
})
})
console.log("basladim CodAre")
client.login('Token');