const config = require("../../botconfig/config.json") module.exports = client => { try{ try{ const stringlength = 69; console.log("\n") console.log(` ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓`.bold.brightGreen) console.log(` ┃ `.bold.brightGreen + " ".repeat(-1+stringlength-` ┃ `.length)+ "┃".bold.brightGreen) console.log(` ┃ `.bold.brightGreen + `Discord Bot is online!`.bold.brightGreen + " ".repeat(-1+stringlength-` ┃ `.length-`Discord Bot is online!`.length)+ "┃".bold.brightGreen) console.log(` ┃ `.bold.brightGreen + ` /--/ ${client.user.tag} /--/ `.bold.brightGreen+ " ".repeat(-1+stringlength-` ┃ `.length-` /--/ ${client.user.tag} /--/ `.length)+ "┃".bold.brightGreen) console.log(` ┃ `.bold.brightGreen + " ".repeat(-1+stringlength-` ┃ `.length)+ "┃".bold.brightGreen) console.log(` ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛`.bold.brightGreen) }catch{ /* */ } change_status(client); setInterval(()=>{ change_status(client); }, 30000); }catch (e){ console.log(String(e.stack).bgRed) } } function change_status(client){ try{ const promises = [ client.shard.fetchClientValues('guilds.cache.size'), client.shard.broadcastEval('this.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0)') ]; return Promise.all(promises) .then(results => { const totalGuilds = results[0].reduce((acc, guildCount) => acc + guildCount, 0); const totalMembers = results[1].reduce((acc, memberCount) => acc + memberCount, 0); for(const shard of client.shard.ids) client.user.setActivity(`.help | Shard #${shard}`, {type: "LISTENING", shardID: shard}); }).catch(console.error); }catch (e) { client.user.setActivity(`Loading...`, {type: "PLAYING", shardID: 0}); } }