Answer the question
In order to leave comments, you need to log in
How can I make such statistics on discord.js?
I need to make statistics like this (preferably through a function):
module.exports = async function(bots,user,message,member) {
}
Answer the question
In order to leave comments, you need to log in
const guild = client.guilds.cache.get("id_сервера");
setInterval(function () {
let memberCount = guild.members.cache.filter(member => !member.user.bot).size;
/* количество участников на сервере, которые не являются ботами. */
let memberCountChannel = guild.channels.cache.get("id_голосового_канала");
memberCountChannel.setName(`Участников: ${memberCount}`);
/* устанавливаем голосовому каналу название */
}, 1000);
let onlineMemberCount = guild.members.cache.filter(member => !member.user.bot && member.presence.status === "online").size;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question