From dfb1421f8495192f773e35163b6819fd30b3099e Mon Sep 17 00:00:00 2001 From: omg-xtao <100690902+omg-xtao@users.noreply.github.com> Date: Tue, 8 Mar 2022 20:06:10 +0800 Subject: [PATCH] feat(flash picture): support flash picture --- efb_qq_plugin_go_cqhttp/MsgDecorator.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/efb_qq_plugin_go_cqhttp/MsgDecorator.py b/efb_qq_plugin_go_cqhttp/MsgDecorator.py index 02e3912..67bd157 100644 --- a/efb_qq_plugin_go_cqhttp/MsgDecorator.py +++ b/efb_qq_plugin_go_cqhttp/MsgDecorator.py @@ -28,6 +28,12 @@ class QQMsgProcessor: efb_msg.text = self._("[Image Source missing]") return [efb_msg] + # flash picture + if "flash" == data.get("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