From ae938c17ec1b91b60f07eb7e90dc4f0857aca7d1 Mon Sep 17 00:00:00 2001 From: ZetoHkr Date: Sun, 22 Feb 2026 16:16:23 +0800 Subject: [PATCH 1/2] Update the code syntax to be compatible with the current Deno deployment platform and update the readme documentation. --- README.md | 8 ++++++++ deno_index.ts | 9 ++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fc2e1e4..b82947f 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,8 @@ ## 部署与使用教程 +> 在现在的Deno的个人面板中,已经移除了“New Project”按钮,由“New App”替代。其URL也发生了变化 [参考这里](#验证部署) + 按照以下步骤,轻松部署你自己的 AstrBot GitHub 加速服务: 1. **(可选但推荐)** 给本项目点个 [**Star ⭐**](https://github.com/lxfight/astrbot2github),你的支持是作者更新和维护的动力! @@ -64,6 +66,12 @@ 如果页面显示 `此地址只用于为astrbot提供更快速的github访问服务` 的信息,则表示你的代理服务已成功部署并正在运行。 +在新版本的astrbot中,需要在 **插件市场** 配置插件源,源地址格式: + +`https://.<组织别名>.deno.net/https://github.com/AstrBotDevs/AstrBot_Plugins_Collection/raw/refs/heads/main/plugins.json` + +> `https://github.com/AstrBotDevs/AstrBot_Plugins_Collection/raw/refs/heads/main/plugins.json`是官方仓库提供的插件列表。 + ## 注意事项 * **专为 AstrBot 设计**: 本项目主要解决了 AstrBot 在下载插件 `.zip` 包 (`/raw/` 或 `/archive/`) 时可能遇到的网络问题。它针对 AstrBot 的特定请求路径进行了优化,并非一个通用的 GitHub 网站或 API 代理。 diff --git a/deno_index.ts b/deno_index.ts index 2c9aa73..8cdeb8f 100644 --- a/deno_index.ts +++ b/deno_index.ts @@ -1,5 +1,3 @@ -import { serve } from "https://deno.land/std@0.155.0/http/server.ts"; // 或更新到最新稳定版,如 @0.224.0 - async function handler(req: Request): Promise { const incomingUrl = new URL(req.url); if (incomingUrl.pathname === "/") { @@ -72,6 +70,7 @@ async function handler(req: Request): Promise { } } -console.log("此地址只用于帮助astrbot更快的连接github"); // Deno Deploy 会自动使用 $PORT -// 监听端口 8000 (本地) 或 Deno Deploy 指定的端口 -serve(handler); +// 使用 Deno 推荐的 Deno.serve 启动服务 +// 这种方式能让 Deno Deploy 自动管理端口和健康检查,避免部署失败 +Deno.serve(handler); + From 6323ebb7a990e44b2cd5e45b7a1cca241ae96fcd Mon Sep 17 00:00:00 2001 From: ZetoHkr Date: Sun, 22 Feb 2026 16:21:28 +0800 Subject: [PATCH 2/2] Fix plugins.json file url. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b82947f..bcf7eb3 100644 --- a/README.md +++ b/README.md @@ -68,9 +68,9 @@ 在新版本的astrbot中,需要在 **插件市场** 配置插件源,源地址格式: -`https://.<组织别名>.deno.net/https://github.com/AstrBotDevs/AstrBot_Plugins_Collection/raw/refs/heads/main/plugins.json` +`https://.<组织别名>.deno.net/https://raw.githubusercontent.com/AstrBotDevs/AstrBot_Plugins_Collection/refs/heads/main/plugins.json` -> `https://github.com/AstrBotDevs/AstrBot_Plugins_Collection/raw/refs/heads/main/plugins.json`是官方仓库提供的插件列表。 +> `https://raw.githubusercontent.com/AstrBotDevs/AstrBot_Plugins_Collection/refs/heads/main/plugins.json`是官方仓库提供的插件列表。 ## 注意事项