Compare commits

..

No commits in common. "a6944e856c82900c35a232b98aff7513b93bafd0" and "aef43f0720280eba07b8337f6a3c33e8cebaead2" have entirely different histories.

11
main.py
View File

@ -332,15 +332,10 @@ class MyPlugin(Star):
async def lovelive(self, event: AstrMessageEvent):
async with aiohttp.ClientSession() as session:
async with session.get('https://api.lovelive.tools/api/SweetNothings') as resp:
if resp.status == 200:
text = await resp.text() # 获取返回的文本内容
chain = [
Comp.At(qq=event.get_sender_id()), # At 消息发送者
Comp.Plain(text) # 使用API返回的文本
chain = [
Comp.At(qq=event.get_sender_id()), # At 消息发送者
Comp.Plain(resp)
]
yield event.chain_result(chain)
else:
yield "获取骚话失败"
@filter.command("部署")