33 lines
831 B
Python
33 lines
831 B
Python
"""group_tools —— 配置注册(按《插件配置文件标准》)。
|
|
|
|
当前插件已具备 handlers/services/utils 分层;此处仅把模块级常量(如违禁词)
|
|
接入统一 Web 配置,使 Web 管理台(/hub)可读可改。
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import sys as _sys
|
|
|
|
from hexi.web_hub.config_standard import register_config_items
|
|
|
|
from . import constants
|
|
|
|
# plugin_id = NoneBot 插件模块名
|
|
_PLUGIN_ID = __package__
|
|
|
|
|
|
def register_config() -> None:
|
|
register_config_items(
|
|
_PLUGIN_ID,
|
|
[
|
|
{
|
|
"key": "BANNED_WORDS",
|
|
"label": "违禁词",
|
|
"type": "text",
|
|
"item_type": "str",
|
|
"default": list(constants.BANNED_WORDS),
|
|
},
|
|
],
|
|
store=_sys.modules[constants.__name__],
|
|
)
|