open-wa / wa-automate-python

💬 🤖 The most advanced Python whatsapp library for chatbots with advanced features. Be sure to ⭐ this repository for updates!
Other
330 stars 71 forks source link

Unable to add participant in existing group #47

Closed manojsitapara closed 3 years ago

manojsitapara commented 3 years ago

I am getting following error while adding participant in existing group

raise JsException( openwa.wapi_js_wrapper.JsException: Error in function addParticipant ([object Object]). Command: return WAPI.pyFunc(()=>WAPI.addParticipant('123456789@g.us','755775775@c.us'), arguments[0])

here is my code res = g.driver.add_participant_group(idParticipant=group_member_id, idGroup=group_id)

Can anyone please help me?

mrodal commented 3 years ago

Its working fine for me, can you try executing WAPI.addParticipant('123456789@g.us','755775775@c.us') on the browser's console directly?

manojsitapara commented 3 years ago

I ran the command as you mentioned above, got this error

Uncaught SyntaxError: unexpected token: identifier

darkash commented 3 years ago

the first number is a group (?) note that it's @g.us instead of @c.us

otherwise you can ignore my comment, it's also working fine on my end

manojsitapara commented 3 years ago

ohhh what a silly mistake I did. I was trying to add participant in the group in which I was not admin. I am sorry for the trouble to everyone.