From 4ae4244ac1ac85d427fe8caefe51ac2c08feacad Mon Sep 17 00:00:00 2001 From: TNTcraftHIM Date: Mon, 24 Aug 2020 22:36:25 +0800 Subject: [PATCH] =?UTF-8?q?meizi=E6=9A=82=E6=97=B6=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E5=93=81=E4=BA=91=E7=9A=84=E5=9B=BE=E5=BA=93=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E4=B8=8A=E6=B5=81=E7=A4=BE=E4=BC=9A?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- list.json | 12 +++++++++++- meizi.py | 3 ++- shangliu.py | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 shangliu.py diff --git a/list.json b/list.json index 02a82d7..c431986 100644 --- a/list.json +++ b/list.json @@ -222,7 +222,7 @@ }, { "name": "meizi", - "version": "1.2", + "version": "1.3", "section": "profile", "maintainer": "TNTcraftHIM", "size": "2.6 kb", @@ -259,6 +259,16 @@ "supported": true, "des-short": "祖安对线语录", "des": "让你在祖安大舞台能够时而儒雅,时而火力全开的对线。命令:diss,biss。" + }, + { + "name": "shangliu", + "version": "1.0", + "section": "chat", + "maintainer": "TNTcraftHIM", + "size": "2.4 kb", + "supported": true, + "des-short": "上流对话工具", + "des": "让你可以随时放彩虹屁,毒鸡汤,或者变身营销号(迫真,配合-tts食用更佳)。命令:chp,djt,yxh。" } ] } diff --git a/meizi.py b/meizi.py index e138531..dae5286 100644 --- a/meizi.py +++ b/meizi.py @@ -13,7 +13,8 @@ async def meizi(context): for _ in range (20): #最多重试20次 website = random.randint(0, 13) if website == 0: - img = get("https://mm.52.mk") + continue + # img = get("https://mm.52.mk") 暂时停用 elif website == 1: img = get("https://api.helloworld.la/xiezhen_xinggan.php") elif website == 2: diff --git a/shangliu.py b/shangliu.py new file mode 100644 index 0000000..142ee62 --- /dev/null +++ b/shangliu.py @@ -0,0 +1,49 @@ +from time import sleep +from requests import get +from pagermaid.listener import listener + +@listener(is_plugin=True, outgoing=True, command="chp", + description="彩虹屁生成器。") +async def chp(context): + await context.edit("获取中 . . .") + status=False + for _ in range(20): #最多尝试20次 + req = get("https://chp.shadiao.app/api.php?from=tntcrafthim") + if req.status_code == 200: + res = req.text + await context.edit(res, parse_mode='html', link_preview=False) + status=True + break + else: + continue + if status == False: + await context.edit("出错了呜呜呜 ~ 试了好多好多次都无法访问到 API 服务器 。") + sleep(2) + await context.delete() + +@listener(is_plugin=True, outgoing=True, command="djt", + description="毒鸡汤生成器。") +async def djt(context): + await context.edit("获取中 . . .") + status=False + for _ in range(20): #最多尝试20次 + req = get("https://du.shadiao.app/api.php?from=tntcrafthim") + if req.status_code == 200: + res = req.text + await context.edit(res, parse_mode='html', link_preview=False) + status=True + break + else: + continue + if status == False: + await context.edit("出错了呜呜呜 ~ 试了好多好多次都无法访问到 API 服务器 。") + sleep(2) + await context.delete() + +@listener(is_plugin=True, outgoing=True, command="yxh", + description="营销号文案生成器(建议配合tts食用)。", + parameters="<主体> <事件> <原因>") +async def yxh(context): + await context.edit("生成中 . . .") + req = get("https://du.shadiao.app/api.php?from=tntcrafthim") + await context.edit(f"{context.parameter[0]}{context.parameter[1]}是怎么回事呢?{context.parameter[0]}相信大家都很熟悉,但是{context.parameter[0]}{context.parameter[1]}是怎么回事呢,下面就让小编带大家一起了解吧。\n{context.parameter[0]}{context.parameter[1]},其实就是{context.parameter[2]},大家可能会很惊讶{context.parameter[0]}怎么会{context.parameter[1]}呢?但事实就是这样,小编也感到非常惊讶。\n这就是关于{context.parameter[0]}{context.parameter[1]}的事情了,大家有什么想法呢,欢迎在评论区告诉小编一起讨论哦!") \ No newline at end of file