mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 06:12:53 +08:00
🎨 代码优化
This commit is contained in:
parent
9aec2e9b86
commit
23bfaa530b
@ -47,7 +47,7 @@ class HelpImageBuild:
|
||||
"""
|
||||
if not self._data:
|
||||
self._data = await PluginInfo.filter(
|
||||
menu_type__not_isnull=True,
|
||||
menu_type__not="",
|
||||
load_status=True,
|
||||
plugin_type__in=[PluginType.NORMAL, PluginType.HIDDEN],
|
||||
)
|
||||
|
||||
@ -48,6 +48,10 @@ async def _handle_setting(
|
||||
setting = extra_data.setting or PluginSetting()
|
||||
if metadata.type == "library":
|
||||
extra_data.plugin_type = PluginType.HIDDEN
|
||||
if (
|
||||
extra_data.plugin_type == PluginType.HIDDEN
|
||||
and extra_data.plugin_type != "功能"
|
||||
):
|
||||
extra_data.menu_type = ""
|
||||
plugin_list.append(
|
||||
PluginInfo(
|
||||
|
||||
@ -33,7 +33,7 @@ class PluginInfo(Model):
|
||||
"""进群默认开关状态"""
|
||||
limit_superuser = fields.BooleanField(default=False, description="是否限制超级用户")
|
||||
"""是否限制超级用户"""
|
||||
menu_type = fields.CharField(max_length=255, default="功能", description="菜单类型")
|
||||
menu_type = fields.CharField(max_length=255, default="", description="菜单类型")
|
||||
"""菜单类型"""
|
||||
plugin_type = fields.CharEnumField(PluginType, null=True, description="插件类型")
|
||||
"""插件类型"""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user