whatsapp-web.js
whatsapp-web.js copied to clipboard
[MD friendly] Prevent bans for participant arrays (providing more than 1 id)
you can now use the participant array property in the method without getting banned for providing more than one entry.
Also added sleep timer for adding a delay in milliseconds between actions (added Foo, wait 500ms, added Bar)
Can you explain why this way won't get banned?
Can you explain why this way won't get banned?
The function was getting flagged because of us passing all the ids in in one fell swoop, now we iterate each id and perform the action, giving whatsapp only 1 number
Can you explain why this way won't get banned?
The function was getting flagged because of us passing all the ids in in one fell swoop, now we iterate each id and perform the action, giving whatsapp only 1 number
It is like doing a for loop with an array with one item like before, now we just simply do that loop internally
Sounds good, maybe a sleep too to avoid too fast bans?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Sounds good, maybe a sleep too to avoid too fast bans?
hmm alright added
addParticipants return this error
Uncaught TypeError: t.map is not a function
everything should be fixed, well that was some spaghetti code hahahh
I understand the proposed logic, and it makes sense to get banned for bulk actions. but when applying this PR and testing it I see that isn't promoting admins.
So as it sends each promote request at once, I got in the current WhatsApp version code expects an array, so it wraps it back inside an array on the
for
and it worked for me - and I feel thats happening because Client.createGroup waits for an array (When you create a Group, it expects an array of partcicipants and in WhatsApp you can create a Group With some participants / than You will be instabanned When you to exceed the limit of App).
This is the way the app itself implements the adding/removal..
Anyways not wrapping the id in an array was a typo from my end 🙃
@tuyuribr done