mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-05 03:39:59 +08:00
重写帮助,删除 详细帮助 命令
This commit is contained in:
@@ -116,14 +116,13 @@ class PluginData(BaseModel):
|
||||
des: Optional[str]
|
||||
task: Optional[Dict[str, str]]
|
||||
menu_type: Tuple[Union[str, int], ...] = ("normal",) # 菜单类型
|
||||
version: Optional[Union[str, int]]
|
||||
author: Optional[str]
|
||||
plugin_setting: Optional[PluginSetting]
|
||||
plugin_cd: Optional[PluginCd]
|
||||
plugin_block: Optional[PluginBlock]
|
||||
plugin_count: Optional[PluginCount]
|
||||
plugin_resources: Optional[Dict[str, Union[str, Path]]]
|
||||
plugin_configs: Optional[Dict[str, Dict[str, Any]]]
|
||||
plugin_status: Plugin
|
||||
|
||||
class Config:
|
||||
arbitrary_types_allowed = True
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
from typing import Dict, Any
|
||||
from typing import Dict, Any, Optional
|
||||
|
||||
from . import StaticData
|
||||
from .models import PluginData
|
||||
|
||||
|
||||
class PluginDataManager:
|
||||
class PluginDataManager(StaticData):
|
||||
"""
|
||||
插件所有信息管理
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(None)
|
||||
self._data: Dict[str, PluginData] = {}
|
||||
|
||||
def add_plugin_info(self, info: PluginData):
|
||||
@@ -28,8 +30,6 @@ class PluginDataManager:
|
||||
def __getitem__(self, item) -> PluginData:
|
||||
return self._data.get(item)
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self._data)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user