Skip to content

Instantly share code, notes, and snippets.

@paradox4280
Created October 24, 2020 18:42
Show Gist options
  • Save paradox4280/045a632bf748eb08b421de7093746f43 to your computer and use it in GitHub Desktop.
Save paradox4280/045a632bf748eb08b421de7093746f43 to your computer and use it in GitHub Desktop.
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