提供全局被动控制

This commit is contained in:
HibiKier
2022-12-26 18:40:34 +08:00
parent 802f4df2ce
commit c49ef3052f
11 changed files with 213 additions and 77 deletions
+14 -11
View File
@@ -14,17 +14,20 @@ def init_plugin(func: Callable):
"""
def wrapper(*args, **kwargs):
self = args[0]
module = args[1]
if module not in self._data.keys():
self._data[module] = Plugin(
plugin_name=module,
status=True,
error=False,
block_type=None,
author=None,
version=None,
)
try:
self = args[0]
module = args[1]
if module not in self._data.keys():
self._data[module] = Plugin(
plugin_name=module,
status=True,
error=False,
block_type=None,
author=None,
version=None,
)
except Exception as e:
pass
return func(*args, **kwargs)
return wrapper