重大版本调整:gewechat兼容。

This commit is contained in:
liuwei
2025-04-22 11:17:03 +08:00
parent 41def62467
commit a62bb61901
48 changed files with 2855 additions and 1420 deletions
+1 -5
View File
@@ -3,8 +3,6 @@ import os
import requests
from typing import Dict, Any, List, Optional, Tuple
from wcferry import Wcf
from message_util import MessageUtil
from plugin_common.message_plugin_interface import MessagePluginInterface
from plugin_common.plugin_interface import PluginStatus
@@ -51,7 +49,6 @@ class VideoManPlugin(MessagePluginInterface):
self.LOG.info(f"正在初始化 {self.name} 插件...")
# 保存上下文对象
self.wcf = context.get("wcf")
self.event_system = context.get("event_system")
self.message_util: MessageUtil = context.get("message_util")
self.gbm = context.get("gbm")
@@ -97,7 +94,6 @@ class VideoManPlugin(MessagePluginInterface):
self.LOG.info(f"插件执行: {self.name}{content}")
sender = message.get("sender")
roomid = message.get("roomid", "")
wcf: Wcf = message.get("wcf")
gbm: GroupBotManager = message.get("gbm")
# 检查权限
@@ -114,7 +110,7 @@ class VideoManPlugin(MessagePluginInterface):
return False, "视频下载失败"
# 发送视频
result = wcf.send_file(file_abspath, (roomid if roomid else sender))
result = self.message_util.send_file(file_abspath, (roomid if roomid else sender))
self.LOG.info(f"发送视频结果: {result}")
return True, "发送成功"