From 81d843aff201872fec900f7c32bb4b83fea6e0ab Mon Sep 17 00:00:00 2001 From: liuwei Date: Thu, 22 Jan 2026 17:44:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E6=96=97=E9=B1=BC=E5=BC=80?= =?UTF-8?q?=E6=92=AD=E4=B8=8B=E6=92=AD=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/douyu/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/douyu/main.py b/plugins/douyu/main.py index 31f13bb..200aa61 100644 --- a/plugins/douyu/main.py +++ b/plugins/douyu/main.py @@ -13,6 +13,7 @@ from utils.decorator.plugin_decorators import plugin_stats_decorator from utils.decorator.points_decorator import plugin_points_cost from utils.robot_cmd.robot_command import Feature, PermissionStatus, GroupBotManager from wechat_ipad import WechatAPIClient +from wechat_ipad.models.appmsg_xml import DOUYU_MESSAGE_XML class DouyuRedisManager: @@ -233,10 +234,12 @@ class DouyuPlugin(MessagePluginInterface): async def _notify_groups_live(self, room_id: str, nickname: str, room_name: str): groups = self.redis_manager.groups_for_room(room_id) text = f"🚀 斗鱼开播通知 \n🎤 {nickname} 正在直播中!\n 📌 房间标题:{room_name} \n 👉 点击观看:https://www.douyu.com/{room_id}" + xml_content = DOUYU_MESSAGE_XML.format(title=room_name, liver=nickname, roomid=room_id) for gid in groups: if GroupBotManager.get_group_permission(gid, self.feature) == PermissionStatus.ENABLED: try: await self.bot.send_text_message(gid, text) + await self.bot.send_link_xml_message(xml_content, gid) except Exception as e: logger.error(f"发送斗鱼开播提醒失败: {e}") continue