mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-02 02:00:01 +08:00
提供全局被动控制
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user