mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-14 21:52:56 +08:00
🐛 修复插件限制加载显示
This commit is contained in:
parent
dd58a4eb3a
commit
5c0171767c
@ -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()
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user