Delete contact in a room It only works when bot is the owner of the room. Args: contact: the contact to be deleted Examples: >>> await room.delete(contact) Returns: None
(self, contact: Contact)
| 464 | await self.ready(force_sync=True) |
| 465 | |
| 466 | async def delete(self, contact: Contact) -> None: |
| 467 | """ |
| 468 | Delete contact in a room |
| 469 | |
| 470 | It only works when bot is the owner of the room. |
| 471 | Args: |
| 472 | contact: the contact to be deleted |
| 473 | Examples: |
| 474 | >>> await room.delete(contact) |
| 475 | Returns: |
| 476 | None |
| 477 | """ |
| 478 | log.info('Room delete<%s>', contact) |
| 479 | |
| 480 | if contact is None or contact.contact_id is None: |
| 481 | raise WechatyOperationError('Contact is none or contact_id not found') |
| 482 | await self.puppet.room_delete(self.room_id, contact.contact_id) |
| 483 | # reload the payload |
| 484 | await self.ready(force_sync=True) |
| 485 | |
| 486 | async def quit(self) -> None: |
| 487 | """ |
nothing calls this directly
no test coverage detected