Files
HeXi/hexi/plugins/nonebot_plugin_group_tools/config.py
T
sansenhoshiandClaude 9371a28e35 refactor: restructure plugins per MTSS standard, consolidate assets to res/
Per docs/plugin-audit-report.md (plugins normalized to
Trigger(handlers) → Service(services) → Model(repository/models) + utils):

- Split monolithic __init__.py into handlers/services/utils across
  dailywife, deer_pipe, dice, galgame_card, helldivers_tools,
  huoziyinshua, learning_chat, makeaquote, mc_server_status,
  ncm_saying, picfinder_take, picstatus, random_jm_code, regif,
  steam_info, video_analysis, group_tools
- Move static assets under res/: deer_pipe font/img, makeaquote font,
  helldivers img/templates, huoziyinshua HuoZiYinShua
- Add config.py + register_config_items to ncm_saying, random_jm_code,
  group_tools; learning_chat unified config bridge
- Remove deprecated: voice_trans plugin, bf_bot/test.py, dead code in
  dailywife/deer_pipe, empty dirs, debug scripts under helldivers temp
- Disable brash_general_supercredits_tools (stub comment only)
- bot.py: optional stdout/stderr redirect to log file for Web log viewer,
  force ANSI colorize on non-TTY sinks
- Move runtime data (jm_code.json) out of plugin dir into hexi/data
- Docs: plugin-audit-report.md; README reflects removed plugins

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-03 00:44:38 +08:00

33 lines
823 B
Python

"""group_tools —— 配置注册(按《插件配置文件标准》)。
当前插件已具备 handlers/services/utils 分层;此处仅把模块级常量(如违禁词)
接入统一 Web 配置,使 Web 管理台(/hub)可读可改。
"""
from __future__ import annotations
import sys as _sys
from hexi.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__],
)