User

User

new User(obj, client)

Source:
Properties:
Name Type Description
id Int
name String
nick String Nickname.
joinedTime Int
joinedAt Date
avatar String URL to user avatar.
state Int 0: offline, 1: online, 2: afk, 3: busy
stateText String
avatarUrl String
messageCount Int
roles Collection
messages Collection
Parameters:
Name Type Description
obj Object
client Object

Methods

addRole(role) → {Promise}

Source:
Parameters:
Name Type Description
role Role/id
Returns:
Type
Promise

addRoles(roles) → {Promise}

Source:
Parameters:
Name Type Description
roles Array:Role/id
Returns:
Type
Promise

removeRole(role) → {Promise}

Source:
Parameters:
Name Type Description
role Role/id
Returns:
Type
Promise

removeRoles(roles) → {Promise}

Source:
Parameters:
Name Type Description
roles Array:Role/id
Returns:
Type
Promise