Add members settings (#2788)

* Update GroupChat.js

* Update index.d.ts

* style: clarify method doc

* refactor: add additional check

* fix: provide valid error name

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
This commit is contained in:
Gulg 2024-04-28 18:22:07 +05:00 • committed by GitHub
commit b99d28c5c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

6
index.d.ts vendored
View file

@ -1523,6 +1523,12 @@ declare namespace WAWebJS {
setSubject: (subject: string) => Promise<boolean>;
/** Updates the group description */
setDescription: (description: string) => Promise<boolean>;
/**
* Updates the group setting to allow only admins to add members to the group.
* @param {boolean} [adminsOnly=true] Enable or disable this option
* @returns {Promise<boolean>} Returns true if the setting was properly updated. This can return false if the user does not have the necessary permissions.
*/
setAddMembersAdminsOnly: (adminsOnly?: boolean) => Promise<boolean>;
/** Updates the group settings to only allow admins to send messages
* @param {boolean} [adminsOnly=true] Enable or disable this option
* @returns {Promise<boolean>} Returns true if the setting was properly updated. This can return false if the user does not have the necessary permissions.