Constructor
new UserManager(client)
- Description:
Creates a user manager.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
client |
Client | The client instance. |
Methods
(async) fetch(userId) → {Promise.<User>}
- Description:
Fetches a particular user.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
userId |
String | The id of the user to fetch. |
Throws:
TypeError
|
Error
Returns:
The fetched user.
- Type
- Promise.<User>
set(id, user) → {User}
- Description:
Adds a user to the cache.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
id |
String | The ID of the user to cache. |
user |
User | The user to cache. |
Throws:
TypeError
Returns:
- Type
- User