Support flash picture

This commit is contained in:
xtaodada 2022-03-07 22:23:50 +08:00
parent a99269250e
commit 0a43230e76
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -28,6 +28,13 @@ class QQMsgProcessor:
efb_msg.text = self._("[Image Source missing]") efb_msg.text = self._("[Image Source missing]")
return [efb_msg] return [efb_msg]
# flash
if 'type' in data:
if 'flash' == data['type']:
data['url'] = f'https://gchat.qpic.cn/gchatpic_new/1/1-1-' \
f'{data["file"].replace(".image", "").upper()}/0?term=3%27'
efb_msg.text = self._('Send a flash picture.')
efb_msg.file = cq_get_image(data["url"]) efb_msg.file = cq_get_image(data["url"])
if efb_msg.file is None: if efb_msg.file is None:
efb_msg.type = MsgType.Text efb_msg.type = MsgType.Text