Files
NeoBot/plugins/thpic.py

22 lines
522 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
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"))