groups.leave()

Leave a group or a forum. Also removes the roster entry, similar to conversations.remove().

Definition

client.groups.leave(
id: string|Group
):Promise<void,Error>

Parameters

ParameterTypeDescription
idstring|GroupThe group ID or group model

Returns

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

Example

await client.groups.leave('some-group-id');
console.log('left group');