Constructor
new GuildMemberManager(client, guild)
- Description:
Creates a member manager.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
client |
Client | The client instance. |
guild |
Guild | The guild that this member manager belongs to. |
Members
(readonly) guild :Guild
- Description:
The guild that this member manager belongs to.
- Source:
The guild that this member manager belongs to.
Type:
Methods
(async, static) fetchMember(client, guildId, userId) → {Promise.<Member>}
- Description:
Fetches a member, checking the cache first.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
client |
Client | The client instance. |
guildId |
String | The id of the guild the member belongs to. |
userId |
String | The id of the member to fetch. |
Throws:
Returns:
- Type
- Promise.<Member>
(static) getCacheManager(client, guildId) → {GuildMemberManager}
- Description:
Returns the cache manager.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
client |
Client | The client instance. |
guildId |
String | The ID of the guild. |
Returns:
- Type
- GuildMemberManager
(async, static) search(client, guildId, query) → {Promise.<?Array.<Member>>}
- Description:
Searches for members via a search query.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
client |
Client | The client instance. |
guildId |
String | The id of the guild to search. |
query |
String | The search query. |
Throws:
Returns:
The members which match the search query.
- Type
- Promise.<?Array.<Member>>
(async) fetch(user_id) → {Promise.<Member>}
- Description:
Fetches a member.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
user_id |
String | The id of the member to fetch. |
Throws:
Returns:
The fetched member.
- Type
- Promise.<Member>
(async) search(query) → {Promise.<?Array.<Member>>}
- Description:
Searches for members via a search query.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
query |
String | The search query. |
Throws:
Returns:
The members which match the search query.
- Type
- Promise.<?Array.<Member>>
set(id, member) → {Member}
- Description:
Adds a member to the cache.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
id |
String | The ID of the member |
member |
Member | The member to cache. |
Throws:
Returns:
- Type
- Member