refactor(energy): 移除is_sleeping方法对wakeup_manager的依赖
将`schedule_manager.is_sleeping`的调用从`is_sleeping(self.context.wakeup_manager)`修改为`is_sleeping()`,以解耦对`wakeup_manager`的直接依赖。 同时,在`napcat_adapter_plugin`中将`enable_plugin`的默认值修改为`False`。
This commit is contained in:
@@ -206,7 +206,7 @@ class APITestHandler(BaseEventHandler):
|
||||
@register_plugin
|
||||
class NapcatAdapterPlugin(BasePlugin):
|
||||
plugin_name = CONSTS.PLUGIN_NAME
|
||||
enable_plugin: bool = True
|
||||
enable_plugin: bool = False
|
||||
dependencies: List[str] = [] # 插件依赖列表
|
||||
python_dependencies: List[str] = [] # Python包依赖列表
|
||||
config_file_name: str = "config.toml" # 配置文件名
|
||||
|
||||
@@ -94,7 +94,7 @@ class EnergyManager:
|
||||
continue
|
||||
|
||||
# 判断当前是否为睡眠时间
|
||||
is_sleeping = schedule_manager.is_sleeping(self.context.wakeup_manager)
|
||||
is_sleeping = schedule_manager.is_sleeping()
|
||||
|
||||
if is_sleeping:
|
||||
# 睡眠中:减少睡眠压力
|
||||
|
||||
Reference in New Issue
Block a user