🔖 Update to v1.2.32

This commit is contained in:
xtaodada 2023-02-01 01:07:21 +08:00
parent 5a49bec540
commit 7d3b6a9aee
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
5 changed files with 6 additions and 10 deletions

View File

@ -12,7 +12,7 @@ from pagermaid.scheduler import scheduler
import pyromod.listen
from pyrogram import Client
pgm_version = "1.2.31"
pgm_version = "1.2.32"
CMD_LIST = {}
module_dir = __path__[0]
working_dir = getcwd()

View File

@ -9,7 +9,7 @@ async def init_web():
if not Config.WEB_ENABLE:
return
if not Config.WEB_SECRET_KEY:
logs.warn("未设置 WEB_SECRET_KEY ,请勿将 PagerMaid-Pyro 暴露在公网")
logs.warning("未设置 WEB_SECRET_KEY ,请勿将 PagerMaid-Pyro 暴露在公网")
import uvicorn
from pagermaid.web import app, init_web

View File

@ -62,8 +62,3 @@ async def run_sh(token: Optional[str] = Header(...), cmd: str = ''):
@route.get('/status', response_class=JSONResponse, dependencies=[authentication()])
async def status():
return (await get_status()).dict()
@route.get('/status', response_class=JSONResponse, dependencies=[authentication()])
async def status():
return (await get_status()).dict()

View File

@ -153,6 +153,10 @@ status = Service(
title='运行信息',
column=2,
items=[
Property.Item(
label='Bot 版本',
content='${version}'
),
Property.Item(
label='Bot 运行时间',
content='${run_time}'

View File

@ -1,7 +1,6 @@
from datetime import timedelta
from pyrogram import Client
from pyrogram.enums import ChatType
from pagermaid.common.cache import cache
@ -11,6 +10,4 @@ async def get_dialogs_list(client: Client):
dialogs = []
async for dialog in client.get_dialogs():
dialogs.append(dialog)
if dialog.chat.type == ChatType.SUPERGROUP:
break
return dialogs