alfred82santa / whalesong

Whalesong is an asyncio python library to manage WebApps remotely. Currently WhatsappWeb is implemented
https://whalesong.readthedocs.io
MIT License
50 stars 19 forks source link

How can i add participants to group? #113

Open gladimaz opened 5 years ago

gladimaz commented 5 years ago

Hello, how can i add participants to group? I found function add_participants, but don't know how use it. Help please.

gladimaz commented 5 years ago

@alfred82santa help please:)

alfred82santa commented 5 years ago

Try:

await manager.chats[group_id].metadata.participants.add_participants([user_id, ])
gladimaz commented 4 years ago

@alfred82santa i tried remove participants my code is: if message.type == MessageTypes.GP2: self.echo('New message: {}'.format(message)) ensure_future(self.admin(message)) async def admin(self,message): await self._driver.chats[message.chat.id].metadata.participants.remove_participants(['********@c.us', ]) and i got this Traceback (most recent call last): File "bots/newsbot.py", line 110, in admin await self._driver.chats[message.chat.id].metadata.participants.remove_participants(['*********@c.us', ]) whalesong.errors.UnknownError: this.collection.removeParticipants is not a function

alfred82santa commented 4 years ago

maybe whatsapp api has changed... I will review next days

gladimaz commented 4 years ago

Thanks you