From 0a43230e768a1bc0bbabd8bbd4bcbf3b5a20d931 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Mon, 7 Mar 2022 22:23:50 +0800 Subject: [PATCH] Support flash picture --- efb_qq_plugin_go_cqhttp/MsgDecorator.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/efb_qq_plugin_go_cqhttp/MsgDecorator.py b/efb_qq_plugin_go_cqhttp/MsgDecorator.py index 02e3912..97f0100 100644 --- a/efb_qq_plugin_go_cqhttp/MsgDecorator.py +++ b/efb_qq_plugin_go_cqhttp/MsgDecorator.py @@ -28,6 +28,13 @@ class QQMsgProcessor: efb_msg.text = self._("[Image Source missing]") 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"]) if efb_msg.file is None: efb_msg.type = MsgType.Text