14 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.Users don't have joinedAt, members do
ah, alr i've been using
member.user
for the events so i just assumed it would be the same
works! thanks for the help.Of course
one last thing, whats the property for a member leaving the guild?
The property, like when they left the guild?
yeah
There isn't one, you'd use Date.now() in guildMemberRemove event
ohh right
i completely forgot about that
my bad
All good
im getting the same error once i added more to it, but i didn't change anything besides
createdAt
Members don't have createdAt property, users do, so this time you'd put member.user.createdAt
Despite sounding similar there is a distinct difference between users and members in Discord:
- User: global Discord user data (global avatar, username, tag, id)
- GuildMember: user data associated to a guild (guild, nickname, roles, voice, guild avatar, etc.)
- Conversion: User ➞ GuildMember | GuildMember ➞ User
* Note: Events received in cached guilds will often have both the member and user available, eg.
interaction.user
and interaction.member
alr, 😭