From 306800bec1a88f396c1686bb9397af2d1a26c1b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CQAQ=E2=80=9D?= <“1540691861@qq.com”> Date: Thu, 22 May 2025 20:05:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9D=A5=E5=8F=A5=E9=AA=9A?= =?UTF-8?q?=E8=AF=9D=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/main.py b/main.py index 8b8bd60..39c9f09 100644 --- a/main.py +++ b/main.py @@ -327,6 +327,16 @@ class MyPlugin(Star): yield "获取表情包失败" else: yield "API请求失败" + + @filter.command("来句骚话") + async def lovelive(self, event: AstrMessageEvent): + async with aiohttp.ClientSession() as session: + async with session.get('https://api.lovelive.tools/api/SweetNothings') as resp: + chain = [ + Comp.At(qq=event.get_sender_id()), # At 消息发送者 + Comp.Plain(resp) + ] + @filter.command("部署") async def bushutest(self, event: AstrMessageEvent): -- 2.47.2