From 36e8f4a99a091b8c65cfabc91e34050bfa9a2830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E6=A2=93=E6=9F=92?= <1787882683@qq.com> Date: Sun, 6 Jul 2025 23:03:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0config=5Fbackup?= =?UTF-8?q?=E5=88=B0.gitignore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f0977e5..ec98f59 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,7 @@ elua.confirmed # C extensions *.so /results - +config_backup/ # Distribution / packaging .Python build/ From 93a8eec15eaca2917c412678501f495546f77665 Mon Sep 17 00:00:00 2001 From: 1334431750 <1334431750@qq.com> Date: Mon, 7 Jul 2025 05:44:29 +0000 Subject: [PATCH 2/2] =?UTF-8?q?feat:=E5=8F=91=E9=80=81=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/send_handler.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/send_handler.py b/src/send_handler.py index e727619..70cfa79 100644 --- a/src/send_handler.py +++ b/src/send_handler.py @@ -175,6 +175,9 @@ class SendHandler: elif seg.type == "music": song_id = seg.data new_payload = self.build_payload(payload, self.handle_music_message(song_id), False) + elif seg.type == "videourl": + video_url = seg.data + new_payload = self.build_payload(payload, self.handle_videourl_message(video_url), False) return new_payload def build_payload(self, payload: list, addon: dict, is_reply: bool = False) -> list: @@ -251,6 +254,12 @@ class SendHandler: "type": "music", "data": {"type": "163", "id": song_id}, } + def handle_videourl_message(self, video_url: str) -> dict: + """处理视频链接消息""" + return { + "type": "video", + "data": {"file": video_url}, + } def handle_ban_command(self, args: Dict[str, Any], group_info: GroupInfo) -> Tuple[str, Dict[str, Any]]: """处理封禁命令