优化代码,删除无效代码
This commit is contained in:
8
robot.py
8
robot.py
@@ -1,5 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import time
|
||||
import asyncio
|
||||
import threading
|
||||
@@ -23,7 +22,6 @@ from utils.revoke.message_auto_revoke import MessageAutoRevoke
|
||||
from utils.robot_cmd.robot_command import GroupBotManager, Feature, PermissionStatus
|
||||
|
||||
from db.connection import DBConnectionManager
|
||||
from message_util import MessageUtil
|
||||
from db.contacts_db import ContactsDBOperator
|
||||
from utils.wechat.contact_manager import ContactManager
|
||||
from utils.wechat.message_to_db import MessageStorage
|
||||
@@ -81,15 +79,13 @@ class Robot(Job):
|
||||
self.event_system = EventSystem()
|
||||
self.plugin_modules = {} # 存储已加载的插件模块
|
||||
self.plugins = {} # 存储已加载的插件实例
|
||||
self.message_util = None
|
||||
# 设置插件系统上下文
|
||||
self.system_context = {
|
||||
"config": config,
|
||||
"event_system": self.event_system,
|
||||
"plugin_registry": self.plugin_registry,
|
||||
"db_pool": self.db_pool,
|
||||
"redis_pool": self.redis_pool,
|
||||
"message_util": self.message_util
|
||||
"redis_pool": self.redis_pool
|
||||
}
|
||||
|
||||
self.plugin_manager = PluginManager(plugin_dir=getattr(self.config, "plugin_dir", "plugins"))
|
||||
@@ -185,8 +181,6 @@ class Robot(Job):
|
||||
|
||||
self.message_storage = MessageStorage(self.ipad_bot)
|
||||
|
||||
# 初始化消息工具类 - 使用联系人管理器
|
||||
self.message_util = MessageUtil(self.ipad_bot)
|
||||
# 先接受堆积消息
|
||||
self.LOG.info("处理堆积消息中")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user