From c357742ec8cf3959522454d6115f31fbb7560565 Mon Sep 17 00:00:00 2001 From: omg-xtao <100690902+omg-xtao@users.noreply.github.com> Date: Mon, 20 Mar 2023 21:55:24 +0800 Subject: [PATCH] =?UTF-8?q?xjj=20=E7=94=9F=E6=88=90=E5=B0=8F=E5=A7=90?= =?UTF-8?q?=E5=A7=90=E8=A7=86=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xjj/DES.md | 5 +++++ xjj/main.py | 30 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 xjj/DES.md create mode 100644 xjj/main.py diff --git a/xjj/DES.md b/xjj/DES.md new file mode 100644 index 0000000..bf99855 --- /dev/null +++ b/xjj/DES.md @@ -0,0 +1,5 @@ +# 生成小姐姐视频 + +``` +,xjj +``` diff --git a/xjj/main.py b/xjj/main.py new file mode 100644 index 0000000..bd963af --- /dev/null +++ b/xjj/main.py @@ -0,0 +1,30 @@ +from pagermaid.listener import listener +from pagermaid.enums import Message, AsyncClient + + +@listener( + command="xjj", + description="小姐姐视频" +) +async def xjj(message: Message, client: AsyncClient): + if message.chat and message.chat.id == -1001441461877: + # 用户群禁止使用此功能 + await message.edit("本群禁止使用此功能。") + return + await message.edit("小姐姐视频生成中 . . .") + try: + res = await client.get('https://cao3.ml/get/get1.php', timeout=10.0) + if res.status_code == 200: + url = res.text + url = url.split("?tag=")[0] + try: + await message.reply_video( + url, + quote=False, + reply_to_message_id=message.reply_to_message_id or message.reply_to_top_message_id + ) + 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__}")