groups.removeMember()

Remove a member from a group.

Definition

client.groups.removeMember(
groupId: string|Group,
memberId: string|User,
):Promise<void,Error>

Parameters

ParameterTypeDescription
groupIdstring|GroupThe group ID or group model
memberIdstring|UserThe user ID or user model

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'
);
console.log('removed member');