diff --git a/astrbot/core/platform/manager.py b/astrbot/core/platform/manager.py index 488f45b94..a12d39af6 100644 --- a/astrbot/core/platform/manager.py +++ b/astrbot/core/platform/manager.py @@ -24,7 +24,10 @@ class PlatformManager(): case "qq_official": from .sources.qqofficial.qqofficial_platform_adapter import QQOfficialPlatformAdapter # noqa: F401 case "vchat": - from .sources.vchat.vchat_platform_adapter import VChatPlatformAdapter # noqa: F401 + try: + from .sources.vchat.vchat_platform_adapter import VChatPlatformAdapter # noqa: F401 + except BaseException: + logger.warning("当前 astrbot 已不维护 vchat 的接入,如有需要请 pip 安装 vchat 然后重启") case "gewechat": from .sources.gewechat.gewechat_platform_adapter import GewechatPlatformAdapter # noqa: F401 diff --git a/astrbot/dashboard/routes/static_file.py b/astrbot/dashboard/routes/static_file.py index 92b515ea7..841efca82 100644 --- a/astrbot/dashboard/routes/static_file.py +++ b/astrbot/dashboard/routes/static_file.py @@ -6,6 +6,10 @@ class StaticFileRoute(Route): index_ = ['/', '/auth/login', '/config', '/logs', '/extension', '/dashboard/default', '/project-atri', '/console', '/chat'] for i in index_: self.app.add_url_rule(i, view_func=self.index) + + @self.app.errorhandler(404) + async def page_not_found(e): + return "404 Not found。如果你初次使用打开面板发现 404,请参考文档: https://astrbot.app/deploy/dashboard-404.html" async def index(self): return await self.app.send_static_file('index.html') \ No newline at end of file