GuildMemberManager

GuildMemberManager

Manages all members belonging to this guild.

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:
TypeError
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:
TypeError
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:
TypeError | Error
Returns:

The fetched member.

Type
Promise.<Member>
Description:
  • Searches for members via a search query.

Source:
Parameters:
Name Type Description
query String

The search query.

Throws:
TypeError | Error
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:
TypeError
Returns:
Type
Member