Best and easy to use multi-purpose discord.js package.
Follow me: https://github.com/kristabbhattarai
Support Server: https://kristab.ml/server or https://discord.gg/EZDfrer
- Advance server stats
- No changes rn
- Must have latest discord.js
- Must have enabled [SERVER MEMBERS INTENT] in your bot to get exact numbers [You can enable it from https://discord.com/developers/applications/]
const { ServerStats , LoadNotification } = require("discordjs-allinone");
ServerStats:
- You must give the value of [ Discord , bot, GuildId, Statschannel, BoosterRoleId, TotalRoleName, TotalRoleOnName ]
- You can add upto 10 role to show its total members and total members online
- Remove the role value if you dont want to add that many roles
const { ServerStats , LoadNotification } = require("discordjs-allinone");
const Discord = require("discord.js");
const client = new Discord.Client()
client.on("ready", async () => {
LoadNotification();
console.log(`${client.user.tag} is now online.`);
});
client.on("ready", async () => {
const bot = client; //if you have <Client> as client
const GuildId = "Your-Guild-Id";
const Statschannel = "Stats-Channel-Id";
const BoosterRoleId = `Booster-RoleId`;
const TotalRoleName = "Name-Of-Total-Roles"; //You can put like Total Staff
const TotalRoleOnName = "Name-Of-Total-Roles-Online"; //You can put like Total Online Staff
const role1 = `RoleId1`;
const role2 = `RoleId2`;
const role3 = `RoleId3`;
const role4 = `RoleId4`;
const role5 = `RoleId5`;
const role6 = `RoleId6`;
const role7 = `RoleId7`;
const role8 = `RoleId8`;
const role9 = `RoleId9`;
const role10 = `RoleId10`;
ServerStats(Discord , bot , GuildId , Statschannel , BoosterRoleId , TotalRoleName , TotalRoleOnName , role1 , role2 , role3 , role4 , role5 , role6 ,role7 , role8 , role9 , role10)
})
client.login("BotToken");