重大版本调整:gewechat兼容。
This commit is contained in:
@@ -4,8 +4,6 @@ import time
|
||||
from datetime import datetime
|
||||
from typing import Dict, Any, List, Optional, Tuple
|
||||
|
||||
from wcferry import Wcf
|
||||
|
||||
from plugin_common.message_plugin_interface import MessagePluginInterface
|
||||
from plugin_common.plugin_interface import PluginStatus
|
||||
from utils.robot_cmd.robot_command import Feature, PermissionStatus, GroupBotManager
|
||||
@@ -51,8 +49,6 @@ class GroupMemberChangePlugin(MessagePluginInterface):
|
||||
"""初始化插件"""
|
||||
self.LOG.info(f"正在初始化 {self.name} 插件...")
|
||||
|
||||
# 保存上下文对象
|
||||
self.wcf: Wcf = context.get("wcf")
|
||||
# 创建消息工具实例message_util
|
||||
self.message_util: MessageUtil = context.get("message_util")
|
||||
|
||||
@@ -130,7 +126,7 @@ class GroupMemberChangePlugin(MessagePluginInterface):
|
||||
"""检查指定群的成员变化"""
|
||||
try:
|
||||
# 获取当前群成员
|
||||
current_members = self.wcf.get_chatroom_members(group_id)
|
||||
current_members = self.message_util.get_chatroom_members(group_id)
|
||||
|
||||
# 添加安全检查:如果获取到的成员列表为空,可能是接口异常
|
||||
if not current_members:
|
||||
|
||||
Reference in New Issue
Block a user