Chat / JavaScript
Chat JavaScript v4
Chat JavaScript
Chat
JavaScript
Version 4
Home
/
Chat
/
JavaScript
/
User

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.

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

const members = await query.next();