Created
October 24, 2020 18:42
-
-
Save paradox4280/045a632bf748eb08b421de7093746f43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = client => { | |
const channelId = 'Your Channel Id' | |
const updateMembers = guild => { | |
const channel = guild.channels.cache.get(channelId) | |
channel.setName(`🍪┃Members: ${guild.memberCount.toLocaleString()}`) | |
// 500 -> 500 | |
// 1300 -> 13,00 | |
} | |
client.on('guildMemberAdd', member => updateMembers(member.guild)) | |
client.on('guildMemberRemove', member => updateMembers(member.guild)) | |
const guild = client.guilds.cache.get('Your Server Id') | |
updateMembers(guild) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment