mirror of
https://github.com/TeamPGM/PagerMaid_Plugins_Pyro.git
synced 2024-11-22 01:57:47 +00:00
xtaodada
fb5a3f5baf
All checks were successful
Github commit to telegram / build (push) Successful in 13s
16 lines
618 B
Python
16 lines
618 B
Python
from pyrogram import Client
|
|
|
|
from pagermaid.dependence import client
|
|
from pagermaid.enums import Message
|
|
from pagermaid.listener import listener
|
|
from pagermaid.utils.bot_utils import edit_delete
|
|
|
|
|
|
@listener(command="diss", description="儒雅随和版祖安语录。")
|
|
async def diss(_: Client, message: Message):
|
|
for _ in range(5):
|
|
req = await client.get("https://api.oddfar.com/yl/q.php?c=1009&encode=text")
|
|
if req.status_code == 200:
|
|
return await message.edit(req.text)
|
|
await edit_delete(message, "出错了呜呜呜 ~ 试了好多好多次都无法访问到 API 服务器 。")
|