groups.addMembers()
Add members to a group.
Definition
client.groups.addMembers(groupId: string|Group,memberIds: Array<string|User>,):Promise<void,Error>
Parameters
Parameter | Type | Description |
---|---|---|
groupId | string |Group | The group ID or group model |
memberIds | Array<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.addMember('some-group-id',['some-user-id-1', 'some-user-id-2']);console.log('added members');