hullcss-discord-bot/events/ready.js

17 lines
510 B
JavaScript
Raw Normal View History

2022-05-10 01:17:25 +01:00
const client = require("../index");
2022-06-02 02:14:39 +01:00
2022-05-10 01:17:25 +01:00
client.on('ready', () => {
2022-06-02 02:34:17 +01:00
console.log('HullCSS is online')
client.user.setActivity(`!help | hullcss.org`, {type:"WATCHING"})
2022-05-10 01:17:25 +01:00
2022-06-02 02:14:39 +01:00
const guild = client.guilds.cache.get('744586833135927366');
setInterval(() =>{
2022-06-02 02:14:39 +01:00
const memberCount = guild.members.cache.filter(m => !m.user.bot).size;
2022-06-02 02:40:53 +01:00
const channel = guild.channels.cache.get('906167542249308160');
channel.setName(`Discord Members: ${memberCount.toLocaleString()}`);
2022-06-02 02:14:39 +01:00
}, 600000);
2022-06-02 02:34:17 +01:00
})