From 37859bcfcb44d7d89e2558b5911b228a69f640c6 Mon Sep 17 00:00:00 2001 From: baby20162016 <2185823427@qq.com> Date: Fri, 2 Jan 2026 10:29:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8F=92=E4=BB=B6thpic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base_plugins/thpic.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 base_plugins/thpic.py diff --git a/base_plugins/thpic.py b/base_plugins/thpic.py new file mode 100644 index 0000000..caa752d --- /dev/null +++ b/base_plugins/thpic.py @@ -0,0 +1,15 @@ +""" +thpic 插件 + +提供 /thpic 指令,用于随机返回一个东方Project的图片。 + +""" + +from core.bot import Bot +from core.command_manager import matcher +from models import MessageEvent, MessageSegment + + +@matcher.command("thpic") +async def handle_echo(bot: Bot, event: MessageEvent, args: list[str]): + await event.reply(MessageSegment.image("https://img.paulzzh.com/touhou/random"))