mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-25 12:17:50 +00:00
添加diss多次尝试功能
This commit is contained in:
parent
e96ae56736
commit
0e2d90de38
21
diss.py
21
diss.py
@ -1,7 +1,4 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
from time import sleep
|
from time import sleep
|
||||||
>>>>>>> master
|
|
||||||
from requests import get
|
from requests import get
|
||||||
from pagermaid.listener import listener
|
from pagermaid.listener import listener
|
||||||
|
|
||||||
@ -9,14 +6,6 @@ from pagermaid.listener import listener
|
|||||||
description="儒雅随和版祖安语录。")
|
description="儒雅随和版祖安语录。")
|
||||||
async def diss(context):
|
async def diss(context):
|
||||||
await context.edit("获取中 . . .")
|
await context.edit("获取中 . . .")
|
||||||
<<<<<<< HEAD
|
|
||||||
req = get("https://nmsl.shadiao.app/api.php?level=min&from=tnt")
|
|
||||||
if req.status_code == 200:
|
|
||||||
res = req.text
|
|
||||||
await context.edit(res, parse_mode='html', link_preview=False)
|
|
||||||
else:
|
|
||||||
await context.edit("出错了呜呜呜 ~ 无法访问到 API 服务器 。")
|
|
||||||
=======
|
|
||||||
status=False
|
status=False
|
||||||
for _ in range(20): #最多尝试20次
|
for _ in range(20): #最多尝试20次
|
||||||
req = get("https://nmsl.shadiao.app/api.php?level=min&from=tntcrafthim")
|
req = get("https://nmsl.shadiao.app/api.php?level=min&from=tntcrafthim")
|
||||||
@ -31,20 +20,11 @@ async def diss(context):
|
|||||||
await context.edit("出错了呜呜呜 ~ 试了好多好多次都无法访问到 API 服务器 。")
|
await context.edit("出错了呜呜呜 ~ 试了好多好多次都无法访问到 API 服务器 。")
|
||||||
sleep(2)
|
sleep(2)
|
||||||
await context.delete()
|
await context.delete()
|
||||||
>>>>>>> master
|
|
||||||
|
|
||||||
@listener(is_plugin=True, outgoing=True, command="biss",
|
@listener(is_plugin=True, outgoing=True, command="biss",
|
||||||
description="加带力度版祖安语录。")
|
description="加带力度版祖安语录。")
|
||||||
async def biss(context):
|
async def biss(context):
|
||||||
await context.edit("获取中 . . .")
|
await context.edit("获取中 . . .")
|
||||||
<<<<<<< HEAD
|
|
||||||
req = get("https://nmsl.shadiao.app/api.php?&from=tnt")
|
|
||||||
if req.status_code == 200:
|
|
||||||
res = req.text
|
|
||||||
await context.edit(res, parse_mode='html', link_preview=False)
|
|
||||||
else:
|
|
||||||
await context.edit("出错了呜呜呜 ~ 无法访问到 API 服务器 。")
|
|
||||||
=======
|
|
||||||
status=False
|
status=False
|
||||||
for _ in range(20): #最多尝试20次
|
for _ in range(20): #最多尝试20次
|
||||||
req = get("https://nmsl.shadiao.app/api.php?from=tntcrafthim")
|
req = get("https://nmsl.shadiao.app/api.php?from=tntcrafthim")
|
||||||
@ -59,4 +39,3 @@ async def biss(context):
|
|||||||
await context.edit("出错了呜呜呜 ~ 试了好多好多次都无法访问到 API 服务器 。")
|
await context.edit("出错了呜呜呜 ~ 试了好多好多次都无法访问到 API 服务器 。")
|
||||||
sleep(2)
|
sleep(2)
|
||||||
await context.delete()
|
await context.delete()
|
||||||
>>>>>>> master
|
|
||||||
|
@ -252,10 +252,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "diss",
|
"name": "diss",
|
||||||
"version": "1.0",
|
"version": "1.1",
|
||||||
"section": "chat",
|
"section": "chat",
|
||||||
"maintainer": "TNTcraftHIM",
|
"maintainer": "TNTcraftHIM",
|
||||||
"size": "1.0 kb",
|
"size": "1.5 kb",
|
||||||
"supported": true,
|
"supported": true,
|
||||||
"des-short": "祖安对线语录",
|
"des-short": "祖安对线语录",
|
||||||
"des": "让你在祖安大舞台能够时而儒雅,时而火力全开的对线。命令:diss,biss。"
|
"des": "让你在祖安大舞台能够时而儒雅,时而火力全开的对线。命令:diss,biss。"
|
||||||
|
Loading…
Reference in New Issue
Block a user