Member
This data type describes all available data about the member and operations over them.
Properties
| Property | Type | Description |
|---|---|---|
id | Number | Unique identifier |
mention | String | Mention string |
name | String | Name |
displayName | String | Display Name |
nickname | String | Nickname on the server or original name |
tag | String | Full tag in the format Nickname#1234 |
bot | Boolean | true if this member is bot |
moderator | Boolean | true if this member is server moderator |
discriminator | String | Discriminator (4 digits after #) |
joinedAt | DateTime | Join date and time |
createdAt | DateTime | Registration date and time |
status | String | Status (Online, Idle, DnD, Offline) |
avatarUrl | String | Avatar URL |
guildAvatarUrl | String | Per-Guild Avatar URL or original one if it is not set |
bannerUrl | String | Profile Banner URL |
accentColor | String | Profile Accent Color in #RRGGBB format |
bio | String | Bio specified in /user |
rank | Rank | Ranking data |
roles | List<Role> | List of assigned roles |
guild | Guild | Server information |
attributes | MemberAttributes | Attributes storage |
activities | List<Activity> | Member activities |
voiceState | MemberVoiceState | Member voice channel connectivity state |
primaryGuild | MemberPrimaryGuild | Member primary guild (Server Tag) |
flags | List<UserFlag> | Member flags |
Methods
hasRole(Role)
hasRoles(Roles)
hasAnyRole(Roles)
hasPermission(Name)
hasPermissions(Names)
hasPermission(Channel, Name)
hasPermissions(Channel, Names)
hasFlag(Flag)
addRole(Role)
Adds role to the member. Returns true if member roles were updated.
Returns: Boolean
Warning! Quota
Following methods have shared quota and can only be invoked 1 times in the same template:
addRoleaddRolesaddTempRoleaddTempRolesremoveRoleremoveRolesmodifyRoles
Active Bonus on the server increases quota to 2.
addRoles(Roles)
Adds roles to the member. Returns true if member roles were updated.
Returns: Boolean
Warning! Quota
Following methods have shared quota and can only be invoked 1 times in the same template:
addRoleaddRolesaddTempRoleaddTempRolesremoveRoleremoveRolesmodifyRoles
Active Bonus on the server increases quota to 2.
addTempRole(Role, Duration)
Adds role to the member temporary. Returns true if member roles were updated (not less than 15 seconds).
Returns: Boolean
Warning! Quota
Following methods have shared quota and can only be invoked 1 times in the same template:
addRoleaddRolesaddTempRoleaddTempRolesremoveRoleremoveRolesmodifyRoles
Active Bonus on the server increases quota to 2.
addTempRoles(Roles, Duration)
Adds roles to the member temporary. Returns true if member roles were updated (not less than 15 seconds).
Returns: Boolean
Warning! Quota
Following methods have shared quota and can only be invoked 1 times in the same template:
addRoleaddRolesaddTempRoleaddTempRolesremoveRoleremoveRolesmodifyRoles
Active Bonus on the server increases quota to 2.
removeRole(Role)
Removes role from the member. Returns true if member roles were updated.
Returns: Boolean
Warning! Quota
Following methods have shared quota and can only be invoked 1 times in the same template:
addRoleaddRolesaddTempRoleaddTempRolesremoveRoleremoveRolesmodifyRoles
Active Bonus on the server increases quota to 2.
removeRoles(Roles)
Removes roles from the member. Returns true if member roles were updated.
Returns: Boolean
Warning! Quota
Following methods have shared quota and can only be invoked 1 times in the same template:
addRoleaddRolesaddTempRoleaddTempRolesremoveRoleremoveRolesmodifyRoles
Active Bonus on the server increases quota to 2.
modifyRoles(Add, Remove)
Adds and removes roles from the member automatically. Returns true if member roles were updated.
Returns: Boolean
Warning! Quota
Following methods have shared quota and can only be invoked 1 times in the same template:
addRoleaddRolesaddTempRoleaddTempRolesremoveRoleremoveRolesmodifyRoles
Active Bonus on the server increases quota to 2.
modifyNickname(Name)
Changes member's nickname. Nickname length must be in range 2 to 32.
Returns true if name was updated.
Returns: Boolean
Warning! Quota
This method can only be invoked 1 times in the same template.
getAttribute(Key)
Returns member attribute (stored value).
Returns: MemberAttribute
Warning! Quota
This method can only be invoked 5 times in the same template.
Active Bonus on the server increases quota to 10.