mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-09-30 17:20:03 +08:00
update 0.0.6.0
This commit is contained in:
@@ -55,17 +55,11 @@ class Plugins2settingsManager(StaticData):
|
||||
if limit_superuser is not None
|
||||
else False,
|
||||
"cmd": cmd,
|
||||
"plugin_type": list(plugin_type if plugin_type is not None else ("normal",))
|
||||
"plugin_type": list(
|
||||
plugin_type if plugin_type is not None else ("normal",)
|
||||
),
|
||||
}
|
||||
|
||||
def remove_plugin_settings(self, plugin: str):
|
||||
"""
|
||||
删除一个插件设置
|
||||
:param plugin: 插件模块名称
|
||||
"""
|
||||
if self._data.get(plugin):
|
||||
del self._data[plugin]
|
||||
|
||||
def get_plugin_data(self, module: str) -> dict:
|
||||
"""
|
||||
通过模块名获取数据
|
||||
@@ -99,4 +93,4 @@ class Plugins2settingsManager(StaticData):
|
||||
if self.file.exists():
|
||||
with open(self.file, "r", encoding="utf8") as f:
|
||||
self._data: dict = yaml.load(f)
|
||||
self._data = self._data['PluginSettings']
|
||||
self._data = self._data["PluginSettings"]
|
||||
|
||||
Reference in New Issue
Block a user