MCPcopy Index your code
hub / github.com/wechaty/python-wechaty / ready

Method ready

src/wechaty/user/message.py:523–543  ·  view source on GitHub ↗

sync load message Examples: >>> msg.ready()

(self)

Source from the content-addressed store, hash-verified

521 return user_self.contact_id in self.payload.mention_ids
522
523 async def ready(self) -> None:
524 """
525 sync load message
526 Examples:
527 >>> msg.ready()
528 """
529 log.debug('Message ready <%s>', self)
530 if self.is_ready():
531 return
532
533 self.payload = await self.puppet.message_payload(self.message_id)
534
535 if self.payload.from_id.strip() != '':
536 talker = self.wechaty.Contact.load(self.payload.from_id)
537 await talker.ready()
538 if self.payload.room_id.strip() != '':
539 room = self.wechaty.Room.load(self.payload.room_id)
540 await room.ready()
541 if self.payload.to_id.strip() != '':
542 to_contact = self.wechaty.Contact.load(self.payload.to_id)
543 await to_contact.ready()
544
545 async def forward(self, to: Union[Room, Contact]) -> None:
546 """

Callers 5

mention_selfMethod · 0.95
sayMethod · 0.45
to_recalledMethod · 0.45
id_to_contactMethod · 0.45
to_contactMethod · 0.45

Calls 3

is_readyMethod · 0.80
message_payloadMethod · 0.80
loadMethod · 0.45

Tested by

no test coverage detected