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

Method create_from_message

src/wechaty/user/mini_program.py:52–63  ·  view source on GitHub ↗

static create MiniProgram method :return:

(cls, message: Message)

Source from the content-addressed store, hash-verified

50
51 @classmethod
52 async def create_from_message(cls, message: Message) -> MiniProgram:
53 """
54 static create MiniProgram method
55 :return:
56 """
57 log.info(f'loading the mini-program from message <{message}>')
58
59 mini_program_payload = await cls.get_puppet().message_mini_program(
60 message_id=message.message_id)
61
62 mini_program = MiniProgram(mini_program_payload)
63 return mini_program
64
65 @classmethod
66 def create_from_json(cls, payload_data: dict) -> MiniProgram:

Callers

nothing calls this directly

Calls 3

MiniProgramClass · 0.85
message_mini_programMethod · 0.80
get_puppetMethod · 0.80

Tested by

no test coverage detected