🫂Member
The Member component extends the User component. (Member is a Guild Member or Server Member)
Properties
roles
Member's roles
Array|null
nickname
Member's guild nickname
String|null
_joinedAt
Timestamp of when the user joined the guild.
Number|null
isOwner
If the member is the guild's owner or not.
Boolean
guildID
The ID of the guild.
String
guild
Guild component
joinedAt
string representation of the _joinedAt timestamp.
Date
user
User component with less information.
Constructor
rawData
raw data received from ws and converted to JSON
Object
true
client
Client
true
guildID
Guild id
String
true
Do not use this constructor unless you know what you're doing. This constructor is used to return you rawdata into component.
Methods
getSocialLink(socialMediaName)
Get a specific social link from member.
socialMediaName
The name of the social you'd like to get from the member
String
true
Returns: Promise<Object>
addToGroup(groupID)
Add member to a guild group.
groupID
the id of the guild group
String
true
Returns: Promise<void>
removeFromGroup(groupID)
Remove member from a guild group.
groupID
the id of the guild group
String
true
Returns: Promise<void>
addRole(roleID)
Add a role to member.
roleID
the id of the role
Number
true
Returns: Promise<void>
removeRole(roleID)
Remove a role from member.
roleID
the id of the role
Number
true
Returns: Promise<void>
award(xpAmount)
Awards member using the built-in EXP system. (Returns the 'total' of experience)
xpAmount
amount of xp
Number
true
Returns: Promise<Number>
setXP(xpAmount)
Sets member's xp using the built-in EXP system. (Returns the 'total' of experience)
xpAmount
amount of xp
Number
true
Returns: Promise<Number>
Last updated