2022-06-09 12:15:52 +00:00
|
|
|
from pyrogram import Client
|
2024-09-28 14:35:08 +00:00
|
|
|
|
|
|
|
from pagermaid.dependence import client
|
|
|
|
from pagermaid.enums import Message
|
2022-06-09 12:15:52 +00:00
|
|
|
from pagermaid.listener import listener
|
2024-09-28 14:35:08 +00:00
|
|
|
from pagermaid.utils.bot_utils import edit_delete
|
2022-06-09 12:15:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
@listener(command="diss", description="儒雅随和版祖安语录。")
|
|
|
|
async def diss(_: Client, message: Message):
|
2022-06-14 07:54:55 +00:00
|
|
|
for _ in range(5):
|
2022-06-09 12:15:52 +00:00
|
|
|
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 服务器 。")
|