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

Method has

src/wechaty/user/room.py:620–634  ·  view source on GitHub ↗

Check if the room has member `contact`, the return is a Promise and must be `await`-ed Args: contact: the contact to be checked Examples: >>> res = await room.has(contact) Returns: bool: True if the room has member `contact

(self, contact: Contact)

Source from the content-addressed store, hash-verified

618 return None
619
620 async def has(self, contact: Contact) -> bool:
621 """
622 Check if the room has member `contact`, the return is a Promise and
623 must be `await`-ed
624 Args:
625 contact: the contact to be checked
626 Examples:
627 >>> res = await room.has(contact)
628 Returns:
629 bool: True if the room has member `contact`, False otherwise
630 """
631 if self.payload is None:
632 await self.ready()
633 assert self.payload is not None
634 return contact.contact_id in self.payload.member_ids
635
636 async def member_list(self,
637 query: Union[str, RoomMemberQueryFilter] = None

Callers

nothing calls this directly

Calls 1

readyMethod · 0.95

Tested by

no test coverage detected