groups.removeMembers()

Remove members from a group.

Definition

client.groups.removeMembers(
groupId: string|Group,
memberIds: Array<string|User>,
):Promise<void,Error>

Parameters

ParameterTypeDescription
groupIdstring|GroupThe group ID or group model
memberIdsArray<string|User>The user IDs or user models

Returns

An error will be thrown if the operation failed, otherwise the Promise will resolve.

Example

await client.groups.removeMember(
'some-group-id',
['some-user-id-1', 'some-user-id-2']
);
console.log('removed members');