/ SDKs / JavaScript
SDKs
Chat SDKs JavaScript v4
Chat SDKs JavaScript
Chat SDKs
JavaScript
Version 4

Retrieve a list of members and operators in a specific order

Copy link

The members and operators of a group channel can be retrieved by calling the createMemberListQuery() method of a memberListQuery instance. For a specific order, set one of the options in the following table to the order property of memberListQuery.

MemberListQuery.Order

Copy link
ValueDescription

MEMBER_NICKNAME_ALPHABETICAL

Members are arranged in an alphabetical order. This is the default value.

OPERATOR_THEN_MEMBER_ALPHABETICAL

Operators are listed before the members, both in an alphabetical order.

JavaScriptTypeScript
const queryParams = {
    limit: 10,
    order: MemberListOrder.OPERATOR_THEN_MEMBER_ALPHABETICAL,
};
const query = channel.createMemberListQuery(queryParams);

const members = await query.next();