@wppconnect/wa-js - v4.6.0
    Preparing search index...

    Function setChatList

    • Set custom Chat list in panel of whatsapp

      For the custom type, ids are matched against the chat id and also against the equivalent phone number or LID, so both number@c.us and number@lid work no matter how the chat is stored.

      Parameters

      • type: FilterChatListTypes
      • Optionalids: string | string[]

      Returns Promise<{ list?: string[]; type: FilterChatListTypes }>

      // Your custom list
      WPP.chat.setChatList('custom', ['number@c.us', 'number2@c.us']);

      // List only with unread chats
      WPP.chat.setChatList('unread');

      // List only with favorites chats
      WPP.chat.setChatList('favorites');

      // List only with groups chats
      WPP.chat.setChatList('group');

      // List only labels chat
      WPP.chat.setChatList('labels', '454545_labelId');