WhiskeySockets / Baileys

Lightweight full-featured typescript/javascript WhatsApp Web API
https://baileys.whiskeysockets.io/
MIT License
3.52k stars 1.19k forks source link

Support chatModify setting "Admin needs to approve new participants" #370

Closed olalonde closed 3 months ago

olalonde commented 11 months ago

An API to toggle this option.

Screenshot 2023-09-05 at 11 30 21 PM
Riders004 commented 11 months ago

An API to toggle this option.

Screenshot 2023-09-05 at 11 30 21 PM

Check the readme file ita there

olalonde commented 11 months ago

If you mean sock.groupRequestParticipantsUpdate, that's not what I am looking for. This is for a group that is already setup to approve new participants, where as I'm looking for the API to change a group setting to "approve new participants" = "on".

Riders004 commented 11 months ago

const response = await sock.groupRequestParticipantsUpdate( "abcd-xyz@g.us", // id group, ["abcd@s.whatsapp.net", "efgh@s.whatsapp.net"], "approve" // replace this parameter with "reject" ) console.log(response)

Try this

olalonde commented 11 months ago

Isn't this to approve new participants?

Riders004 commented 11 months ago

Isn't this to approve new participants?

Yes but bot need admin

olalonde commented 11 months ago

Ok but that's not what I'm trying to do. I'm trying to change a group setting.

Riders004 commented 11 months ago

Ok but that's not what I'm trying to do. I'm trying to change a group setting.

Change it

bobslavtriev commented 8 months ago

https://github.com/WhiskeySockets/Baileys/pull/534