Manages API methods for GuildMembers and stores their cache.
The cache of items for this manager.
Inherited from DataManagerThe client that instantiated this Manager
Inherited from BaseManagerThe data structure belonging to this manager.
Inherited from DataManagerAdds a user to the guild using OAuth2. This method requires the permission.
Name | Type | Optional | Description |
---|---|---|---|
user | UserResolvable | No | The user to add to the guild |
options | AddGuildMemberOptions & { fetchWhenExisting: false } | No | Options for adding the user to the guild |
Adds a role to a member.
Name | Type | Optional | Description |
---|---|---|---|
options | AddOrRemoveGuildMemberRoleOptions | No | Options for adding the role |
Bans a user from the guild.
Returns
Result object will be resolved as specifically as possible. If the GuildMember cannot be resolved, the User will instead be attempted to be resolved. If that also cannot be resolved, the user id will be the result. Internally calls the GuildBanManager#create method.Name | Type | Optional | Description |
---|---|---|---|
user | UserResolvable | No | The user to ban |
options | BanOptions | Yes | Options for the ban |
Edits a member of the guild. The user must be a member of the guild
Name | Type | Optional | Description |
---|---|---|---|
user | UserResolvable | No | The member to edit |
options | GuildMemberEditOptions | No | The options to provide |
Fetches member(s) from a guild.
Name | Type | Optional | Description |
---|---|---|---|
options | UserResolvable | FetchMemberOptions | (FetchMembersOptions & { user: UserResolvable }) | No | Options for fetching member(s). Omitting the parameter or providing undefined will fetch all members. |
Fetches the client user as a GuildMember of the guild.
Name | Type | Optional | Description |
---|---|---|---|
options | BaseFetchOptions | Yes | The options for fetching the member |
Kicks a user from the guild. The user must be a member of the guild
Returns
Result object will be resolved as specifically as possible. If the GuildMember cannot be resolved, the User will instead be attempted to be resolved. If that also cannot be resolved, the user's id will be the result.Name | Type | Optional | Description |
---|---|---|---|
user | UserResolvable | No | The member to kick |
reason | string | Yes | Reason for kicking |
Lists up to 1000 members of the guild.
Name | Type | Optional | Description |
---|---|---|---|
options | GuildListMembersOptions | Yes | Options for listing members |
Prunes members from the guild based on how long they have been inactive.
Returns
The number of members that were/will be kickedName | Type | Optional | Description |
---|---|---|---|
options | GuildPruneMembersOptions & { dry?: false; count: false } | No | Options for pruning |
Removes a role from a member.
Name | Type | Optional | Description |
---|---|---|---|
options | AddOrRemoveGuildMemberRoleOptions | No | Options for removing the role |
Resolves a data entry to a data Object.
Returns
An instance from this ManagerName | Type | Optional | Description |
---|---|---|---|
idOrInstance | Holds | No | The id or instance of something in this Manager |
Resolves a data entry to an instance id.
Returns
Name | Type | Optional | Description |
---|---|---|---|
idOrInstance | K | Holds | No | The id or instance of something in this Manager |
Searches for members in the guild based on a query.
Name | Type | Optional | Description |
---|---|---|---|
options | GuildSearchMembersOptions | No | Options for searching members |
Unbans a user from the guild. Internally calls the remove method.
Returns
The user that was unbannedName | Type | Optional | Description |
---|---|---|---|
user | UserResolvable | No | The user to unban |
reason | string | Yes | Reason for unbanning user |