diff --git a/pagermaid/__init__.py b/pagermaid/__init__.py index b5c0089..392789b 100644 --- a/pagermaid/__init__.py +++ b/pagermaid/__init__.py @@ -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() diff --git a/pagermaid/modules/web.py b/pagermaid/modules/web.py index be9addc..7eaa6e8 100644 --- a/pagermaid/modules/web.py +++ b/pagermaid/modules/web.py @@ -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 diff --git a/pagermaid/web/api/status.py b/pagermaid/web/api/status.py index e2ab6a2..8b9a928 100644 --- a/pagermaid/web/api/status.py +++ b/pagermaid/web/api/status.py @@ -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() diff --git a/pagermaid/web/pages/home_page.py b/pagermaid/web/pages/home_page.py index 97fafe0..f7dacd2 100644 --- a/pagermaid/web/pages/home_page.py +++ b/pagermaid/web/pages/home_page.py @@ -153,6 +153,10 @@ status = Service( title='运行信息', column=2, items=[ + Property.Item( + label='Bot 版本', + content='${version}' + ), Property.Item( label='Bot 运行时间', content='${run_time}' diff --git a/pyromod/methods/get_dialogs_list.py b/pyromod/methods/get_dialogs_list.py index 1890add..ca8ea5b 100644 --- a/pyromod/methods/get_dialogs_list.py +++ b/pyromod/methods/get_dialogs_list.py @@ -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