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>
This commit is contained in:
2026-09-03 00:44:38 +08:00
co-authored by Claude
parent 25bc30611f
commit 9371a28e35
2389 changed files with 5100 additions and 10127 deletions
@@ -0,0 +1,3 @@
"""语录 —— Trigger 层。"""
from .quote import maq # noqa: F401
@@ -0,0 +1,32 @@
"""语录 —— 触发器(Trigger)层。"""
from __future__ import annotations
from nonebot import logger, on_message, require
from nonebot.adapters.onebot.v11 import Bot, Event
from nonebot.rule import keyword
from nonebot_plugin_alconna import UniMessage
from ..services.generate import generate
from ..utils.reply import extract_reply
require("nonebot_plugin_alconna")
maq = on_message(keyword("maq"))
@maq.handle()
async def maq_handle(bot: Bot, ev: Event):
event = ev.dict()
try:
if event.get("message_type") != "group":
return
reply = await extract_reply(event, bot)
if reply.message == -1:
await maq.finish("请引用文字消息")
logger.info(f"{reply.user_id}, {reply.user_card}, {reply.message}")
image = await generate(reply)
await UniMessage.image(raw=image.getvalue()).send()
except (KeyError, TypeError) as e:
logger.error(e)
await maq.finish(str(e))