删除base_plugins文件夹,迁移到plugins文件夹下,更改models中的init文件和message文件

This commit is contained in:
baby20162016
2026-01-02 15:48:15 +08:00
parent 716739d746
commit 8b0d5de954
5 changed files with 80 additions and 39 deletions

21
plugins/thpic.py Normal file
View File

@@ -0,0 +1,21 @@
"""
thpic 插件
提供 /thpic 指令用于随机返回一个东方Project的图片。
"""
__plugin_meta__ = {
"name": "thpic",
"description": "来看看东方Project的图片吧",
"usage": "/thpic",
}
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"))