Skip to content

$newMember

$newMember holds data for the member after the update, might be a good idea to check partial option before accessing any property. (memberUpdate event)

Usage

$newMember[option]

Parameters

FieldTypeDescriptionRequired
optionstringOption to retrieve.true

Options

FieldTypeDescription
idnumberReturns User ID.
namestringReturns Name of user.
rolesstringReturns User roles.
permissionsstringReturns User permissions.
nickstringReturns User nickname.
highestRoleIDnumberReturns Higher role ID user has.
joinedStampnumberReturns user joined timestamp.
newPermissionsstringReturns new permissions added to user.
addedRolesstringReturns new roles added to user.
bannablebooleanReturns if user is bannable.
kickablebooleanReturns if user is kickable.
manageablebooleanReturns if user is manageable.

Example(s)

  • Note: you need GuildMembers intent
1
client.memberUpdateCommand({
2
channel: "channelid",
3
code: `
4
$username[$newMember[id]] has updated their nickname!
5
- New Nickname: $newMember[nick]
6
- Old Nickname: $oldMember[nick]
7
8
$username[$newMember[id]] has updated their name!
9
- New Name: $newMember[name]
10
- Old Name: $oldMember[name]`
11
});
  • This code will execute when member updates their guild nickname or discord username