$oldMember
holds data for the member before it was updated, this is from discord cache and might be empty depending on
whether it’s cached, so use partial option before attempting to access any property. (memberUpdate event)
Field Type Description Required option string Option to retrieve. true
Field Type Description id number Returns User ID. name string Returns Name of user. roles string Returns User roles. permissions string Returns User permissions. nick string Returns User nickname. highestRoleID number Returns Higher role ID user has. joinedStamp number Returns user joined timestamp. removedPermissions string Returns permissions removed from the user. removedRoles string Returns roles removed from the user. bannable boolean Returns if user is bannable. kickable boolean Returns if user is kickable. manageable boolean Returns if user is manageable.
Note: You need GuildMembers
intent
client. memberUpdateCommand ({
$username[$newMember[id]] has updated their nickname!
- New Nickname: $newMember[nick]
- Old Nickname: $oldMember[nick]
$username[$newMember[id]] has updated their name!
- New Name: $newMember[name]
- Old Name: $oldMember[name]`
This code will execute when member updates their guild nickname or discord username