去除初始化问题!
This commit is contained in:
@@ -53,7 +53,6 @@ class GroupMemberChangePlugin(MessagePluginInterface):
|
||||
# 保存上下文对象
|
||||
self.wcf: Wcf = context.get("wcf")
|
||||
# 获取群管理器
|
||||
self.gbm = context.get("gbm")
|
||||
|
||||
# 从配置中获取启用状态和检查间隔
|
||||
plugin_config = self._config.get("GroupMemberChange", {})
|
||||
@@ -105,11 +104,12 @@ class GroupMemberChangePlugin(MessagePluginInterface):
|
||||
while not self.stop_flag:
|
||||
try:
|
||||
# 获取所有启用了机器人的群组
|
||||
group_list = self.gbm.get_group_list()
|
||||
group_list = GroupBotManager.get_group_list()
|
||||
|
||||
for group_id in group_list:
|
||||
# 检查群是否启用了成员变更提醒功能
|
||||
if self.gbm.get_group_permission(group_id, Feature.GROUP_MEMBER_CHANGE) == PermissionStatus.ENABLED:
|
||||
if GroupBotManager.get_group_permission(group_id,
|
||||
Feature.GROUP_MEMBER_CHANGE) == PermissionStatus.ENABLED:
|
||||
self._check_group_members(group_id)
|
||||
|
||||
# 等待指定的时间间隔
|
||||
|
||||
Reference in New Issue
Block a user