PagerMaid_Plugins_Pyro/xjj/main.py

29 lines
1.1 KiB
Python
Raw Normal View History

2023-03-20 13:55:24 +00:00
from pagermaid.listener import listener
from pagermaid.enums import Message, AsyncClient
2023-07-01 12:18:58 +00:00
@listener(command="xjj", description="小姐姐视频")
2023-03-20 13:55:24 +00:00
async def xjj(message: Message, client: AsyncClient):
if message.chat and message.chat.id == -1001441461877:
# 用户群禁止使用此功能
await message.edit("本群禁止使用此功能。")
return
await message.edit("小姐姐视频生成中 . . .")
try:
2023-07-01 12:18:58 +00:00
res = await client.get("https://cao3.ml/get/get1.php", timeout=10.0)
2023-03-20 13:55:24 +00:00
if res.status_code == 200:
url = res.text
url = url.split("?tag=")[0]
try:
await message.reply_video(
url,
quote=False,
2024-02-04 07:56:06 +00:00
reply_to_message_id=message.reply_to_message_id,
message_thread_id=message.message_thread_id,
2023-03-20 13:55:24 +00:00
)
await message.safe_delete()
except Exception as e:
await message.edit(f"出错了呜呜呜 ~ {e.__class__.__name__}")
except Exception as e:
await message.edit(f"出错了呜呜呜 ~ {e.__class__.__name__}")