MCPcopy
hub / github.com/wechaty/python-wechaty / on_room_join

Method on_room_join

examples/ding-dong-bot-oop.py:213–229  ·  view source on GitHub ↗

on_room_join when there are new contacts to the room Args: room (Room): the room instance invitees (List[Contact]): the new contacts to the room inviter (Contact): the inviter who share qrcode or manual invite someone date (dat

(self, room: Room, invitees: List[Contact],
                           inviter: Contact, date: datetime)

Source from the content-addressed store, hash-verified

211 break
212
213 async def on_room_join(self, room: Room, invitees: List[Contact],
214 inviter: Contact, date: datetime) -> None:
215 """on_room_join when there are new contacts to the room
216
217 Args:
218 room (Room): the room instance
219 invitees (List[Contact]): the new contacts to the room
220 inviter (Contact): the inviter who share qrcode or manual invite someone
221 date (datetime): the datetime to join the room
222 """
223 # 1. say something to welcome the new arrivals
224 names: List[str] = []
225 for invitee in invitees:
226 await invitee.ready()
227 names.append(invitee.name)
228
229 await room.say(f'welcome {",".join(names)} to the wechaty group !')
230
231
232async def main() -> None:

Callers

nothing calls this directly

Calls 2

readyMethod · 0.45
sayMethod · 0.45

Tested by

no test coverage detected