🐛 修复插件限制加载显示

This commit is contained in:
HibiKier 2024-11-23 14:49:53 +08:00
parent dd58a4eb3a
commit 5c0171767c
2 changed files with 3 additions and 3 deletions

View File

@ -202,9 +202,9 @@ async def _():
manager.init()
if limit_list:
for limit in limit_list:
if not manager.exist(limit.module_path, limit.limit_type):
if not manager.exists(limit.module, limit.limit_type):
"""不存在,添加"""
manager.add(limit.module_path, limit)
manager.add(limit.module, limit)
manager.save_file()
await manager.load_to_db()

View File

@ -112,7 +112,7 @@ class Manager:
elif isinstance(data, BaseBlock):
self.block_data[module] = data
def exist(self, module: str, type: PluginLimitType):
def exists(self, module: str, type: PluginLimitType):
"""是否存在"""
if type == PluginLimitType.CD:
return module in self.cd_data