MCPcopy Create free account
hub / github.com/doraemonext/wechat-python-sdk / __init__

Method __init__

wechat_sdk/messages.py:119–126  ·  view source on GitHub ↗
(self, message)

Source from the content-addressed store, hash-verified

117@handle_for_type('voice')
118class VoiceMessage(WechatMessage):
119 def __init__(self, message):
120 try:
121 self.media_id = message.pop('MediaId')
122 self.format = message.pop('Format')
123 self.recognition = message.pop('Recognition', None)
124 except KeyError:
125 raise ParseError()
126 super(VoiceMessage, self).__init__(message)
127
128
129class UnknownMessage(WechatMessage):

Callers

nothing calls this directly

Calls 3

ParseErrorClass · 0.85
popMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected