Join, Leave Message Need Help

I need help with a command.

How can I make this sent from DM’s and add a member count?

I moved this from #glitch-help to #discord-help.


Search engines are you friend! Try looking up “How do DM a user in Discord.js” and “How to get server member count in Discord.js”

1 Like

In Discord.js there are events and properties you can use to do this.

When a new user joins a server it will fire the guildMemberAdd, and to get the size of a server you simply use <Guild>.memberCount.

Honestly thought I would never use this.


Let me google that is pretty funny…

…for glitch…

Lol this animation was too funny :joy:

To send a member a DM use this:


To send a DM with the member count you could use this:

member.send(‘Welcome to our server {member}! We now have {guild.memberCount} members!’)

member.user.username only give the ‘Member’ username. Instead, Try change it as member.user

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.