This commit is contained in:
krau
2026-01-19 13:55:46 +00:00
parent 3c7f8e1020
commit 18b50a29b4
9 changed files with 136 additions and 32 deletions

View File

@@ -96,16 +96,16 @@ url = "socks5://127.0.0.1:7890"
enable = false
session = "data/usersession.db"
存储端列表
Aria2 配置
#
存储端列表用于定义 Bot 支持的存储位置, 每个存储端需要指定名称、类型和相关配置, 使用双中括号语法 [[storages]] 定义.'><meta name=theme-color media="(prefers-color-scheme: light)" content="#ffffff"><meta name=theme-color media="(prefers-color-scheme: dark)" content="#343a40"><meta name=color-scheme content="light dark"><meta property="og:url" content="https://sabot.unv.app/deployment/configuration/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="配置说明"><meta property="og:description" content='配置说明 # SaveAnyBot 的配置文件使用 toml 格式, 你可以在 TOML 官方网站 上了解更多关于 toml 的语法.
Aria2 是一个强大的下载管理器,支持 HTTP/HTTPS、FTP、BitTorrent 等多种协议。启用后Bot 可以使用 /aria2dl 命令通过 Aria2 下载文件。'><meta name=theme-color media="(prefers-color-scheme: light)" content="#ffffff"><meta name=theme-color media="(prefers-color-scheme: dark)" content="#343a40"><meta name=color-scheme content="light dark"><meta property="og:url" content="https://sabot.unv.app/deployment/configuration/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="配置说明"><meta property="og:description" content='配置说明 # SaveAnyBot 的配置文件使用 toml 格式, 你可以在 TOML 官方网站 上了解更多关于 toml 的语法.
SaveAnyBot 需要读取工作目录下的 config.toml 文件作为配置文件, 若缺少该文件则会创建默认文件, 并尝试从环境变量中加载配置.
以下是一个最简的配置文件示例:
[telegram] token = "1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZ" [[users]] # telegram user id id = 777000 blacklist = true [[storages]] name = "本机存储" type = "local" enable = true base_path = "./downloads" 详细配置 # 全局配置 # stream: 是否启用 Stream 模式, 默认为 false. 启用后 Bot 将直接将文件流式传输到存储端(若存储端支持), 不需要下载到本地 Stream 模式对于磁盘空间有限的部署环境十分有用, 但也有一些弊端: 无法使用多线程从 Telegram 下载文件, 速度较慢. 网络不稳定时, 任务失败率高. 无法在中间层对文件进行处理, 例如自动文件类型识别. 并非支持所有存储端, 不支持的存储端可能会降级为普通模式或无法上传. workers: 同时处理任务数量, 默认为 3 threads: 下载文件时使用的线程数, 默认为 4. 仅在未启用 Stream 模式时生效. retry: 任务失败时的重试次数, 默认为 3. proxy: 全局代理配置, 配置后程序内一切网络连接将会尝试使用该代理, 可选. stream = false workers = 3 threads = 4 retry = 3 proxy = "socks5://127.0.0.1:7890" Telegram 配置 # token: 你的 Telegram Bot Token, 可以通过 BotFather 创建 Bot 并获取 Token. app_id, app_hash: Telegram API ID & Hash, 在 Telegram API 创建应用获取, 若不提供则使用默认值. flood_retry: Flood 控制重试次数, 默认为 5. rpc_retry: RPC 请求重试次数, 默认为 5. proxy: 代理配置, 可选. enable: 是否启用代理. url: 代理地址 userbot: userbot 配置, 可选. enable: 启用 userbot 集成, 需要登录用户账号, 此时请务必使用自己的 api id & hash. session: userbot 会话文件路径, 默认为 data/usersession.db. 启用 userbot 集成后, bot 可以下载私密频道和群组的文件, 但具有无法避免的账号被封禁的风险. 开启 userbot 集成后第一次启动 bot 时需要通过终端交互输入手机号, 2FA 和验证码. 如果你使用 docker 部署, 请使用 -it 参数为容器提供交互式环境, 然后执行登录操作. [telegram] token = "1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZ" app_id = 1025907 app_hash = "452b0359b988148995f22ff0f4229750" flood_retry = 5 rpc_retry = 5 [telegram.proxy] enable = false url = "socks5://127.0.0.1:7890" [telegram.userbot] enable = false session = "data/usersession.db" 存储端列表 # 存储端列表用于定义 Bot 支持的存储位置, 每个存储端需要指定名称、类型和相关配置, 使用双中括号语法 [[storages]] 定义.'><meta property="og:locale" content="zh"><meta property="og:type" content="website"><title>配置说明 | Save Any Bot</title><link rel=icon href=/favicon.png><link rel=manifest href=/manifest.json><link rel=canonical href=https://sabot.unv.app/deployment/configuration/><link rel=alternate hreflang=en href=https://sabot.unv.app/en/deployment/configuration/ title="Configuration Guide"><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous><link rel=alternate type=application/rss+xml href=https://sabot.unv.app/deployment/configuration/index.xml title="Save Any Bot"></head><body dir=ltr><input type=checkbox class="hidden toggle" id=menu-control>
[telegram] token = "1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZ" [[users]] # telegram user id id = 777000 blacklist = true [[storages]] name = "本机存储" type = "local" enable = true base_path = "./downloads" 详细配置 # 全局配置 # stream: 是否启用 Stream 模式, 默认为 false. 启用后 Bot 将直接将文件流式传输到存储端(若存储端支持), 不需要下载到本地 Stream 模式对于磁盘空间有限的部署环境十分有用, 但也有一些弊端: 无法使用多线程从 Telegram 下载文件, 速度较慢. 网络不稳定时, 任务失败率高. 无法在中间层对文件进行处理, 例如自动文件类型识别. 并非支持所有存储端, 不支持的存储端可能会降级为普通模式或无法上传. workers: 同时处理任务数量, 默认为 3 threads: 下载文件时使用的线程数, 默认为 4. 仅在未启用 Stream 模式时生效. retry: 任务失败时的重试次数, 默认为 3. proxy: 全局代理配置, 配置后程序内一切网络连接将会尝试使用该代理, 可选. stream = false workers = 3 threads = 4 retry = 3 proxy = "socks5://127.0.0.1:7890" Telegram 配置 # token: 你的 Telegram Bot Token, 可以通过 BotFather 创建 Bot 并获取 Token. app_id, app_hash: Telegram API ID & Hash, 在 Telegram API 创建应用获取, 若不提供则使用默认值. flood_retry: Flood 控制重试次数, 默认为 5. rpc_retry: RPC 请求重试次数, 默认为 5. proxy: 代理配置, 可选. enable: 是否启用代理. url: 代理地址 userbot: userbot 配置, 可选. enable: 启用 userbot 集成, 需要登录用户账号, 此时请务必使用自己的 api id & hash. session: userbot 会话文件路径, 默认为 data/usersession.db. 启用 userbot 集成后, bot 可以下载私密频道和群组的文件, 但具有无法避免的账号被封禁的风险. 开启 userbot 集成后第一次启动 bot 时需要通过终端交互输入手机号, 2FA 和验证码. 如果你使用 docker 部署, 请使用 -it 参数为容器提供交互式环境, 然后执行登录操作. [telegram] token = "1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZ" app_id = 1025907 app_hash = "452b0359b988148995f22ff0f4229750" flood_retry = 5 rpc_retry = 5 [telegram.proxy] enable = false url = "socks5://127.0.0.1:7890" [telegram.userbot] enable = false session = "data/usersession.db" Aria2 配置 # Aria2 是一个强大的下载管理器,支持 HTTP/HTTPS、FTP、BitTorrent 等多种协议。启用后Bot 可以使用 /aria2dl 命令通过 Aria2 下载文件。'><meta property="og:locale" content="zh"><meta property="og:type" content="website"><title>配置说明 | Save Any Bot</title><link rel=icon href=/favicon.png><link rel=manifest href=/manifest.json><link rel=canonical href=https://sabot.unv.app/deployment/configuration/><link rel=alternate hreflang=en href=https://sabot.unv.app/en/deployment/configuration/ title="Configuration Guide"><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous><link rel=alternate type=application/rss+xml href=https://sabot.unv.app/deployment/configuration/index.xml title="Save Any Bot"></head><body dir=ltr><input type=checkbox class="hidden toggle" id=menu-control>
<input type=checkbox class="hidden toggle" id=toc-control><main class="container flex"><aside class=book-menu><div class=book-menu-content><nav><h2 class=book-brand><a class="flex align-center" href=/><img src=/logo.png alt=Logo class=book-icon><span>Save Any Bot</span></a></h2><ul class=book-languages><li><input type=checkbox id=languages class=toggle>
<label for=languages class=flex><a role=button class="flex flex-auto"><img src=/svg/translate.svg class=book-icon alt=Languages>
简体中文</a></label><ul><li><a href=/en/deployment/configuration/>English</a></li></ul></li></ul><ul><li><a href=https://github.com/krau/SaveAny-Bot target=_blank rel=noopener>🔗 GitHub</a></li></ul><ul><li><span>部署指南</span><ul><li><a href=/deployment/installation/>安装与更新</a></li><li><a href=/deployment/configuration/ class=active>配置说明</a><ul><li><a href=/deployment/configuration/storages/>存储端配置</a></li></ul></li></ul></li><li><a href=/usage/>使用帮助</a><ul></ul></li><li><a href=/help/>常见问题</a><ul></ul></li><li><a href=/contribute/>参与开发</a><ul></ul></li></ul></nav><script>(function(){var e=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script></div></aside><div class=book-page><header class=book-header><div class="flex align-center justify-between"><label for=menu-control><img src=/svg/menu.svg class=book-icon alt=Menu></label><h3>配置说明</h3><label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav id=TableOfContents><ul><li><a href=#详细配置>详细配置</a><ul><li><a href=#全局配置>全局配置</a></li><li><a href=#telegram-配置>Telegram 配置</a></li><li><a href=#存储端列表>存储端列表</a></li><li><a href=#用户列表>用户列表</a></li><li><a href=#事件触发>事件触发</a></li><li><a href=#解析器>解析器</a></li><li><a href=#杂项>杂项</a></li></ul></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=配置说明>配置说明
简体中文</a></label><ul><li><a href=/en/deployment/configuration/>English</a></li></ul></li></ul><ul><li><a href=https://github.com/krau/SaveAny-Bot target=_blank rel=noopener>🔗 GitHub</a></li></ul><ul><li><span>部署指南</span><ul><li><a href=/deployment/installation/>安装与更新</a></li><li><a href=/deployment/configuration/ class=active>配置说明</a><ul><li><a href=/deployment/configuration/storages/>存储端配置</a></li></ul></li></ul></li><li><a href=/usage/>使用帮助</a><ul></ul></li><li><a href=/help/>常见问题</a><ul></ul></li><li><a href=/contribute/>参与开发</a><ul></ul></li></ul></nav><script>(function(){var e=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script></div></aside><div class=book-page><header class=book-header><div class="flex align-center justify-between"><label for=menu-control><img src=/svg/menu.svg class=book-icon alt=Menu></label><h3>配置说明</h3><label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav id=TableOfContents><ul><li><a href=#详细配置>详细配置</a><ul><li><a href=#全局配置>全局配置</a></li><li><a href=#telegram-配置>Telegram 配置</a></li><li><a href=#aria2-配置>Aria2 配置</a></li><li><a href=#存储端列表>存储端列表</a></li><li><a href=#用户列表>用户列表</a></li><li><a href=#事件触发>事件触发</a></li><li><a href=#解析器>解析器</a></li><li><a href=#杂项>杂项</a></li></ul></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=配置说明>配置说明
<a class=anchor href=#%e9%85%8d%e7%bd%ae%e8%af%b4%e6%98%8e>#</a></h1><p>SaveAnyBot 的配置文件使用 toml 格式, 你可以在 <a href=https://toml.io/>TOML 官方网站</a> 上了解更多关于 toml 的语法.</p><p>SaveAnyBot 需要读取工作目录下的 <code>config.toml</code> 文件作为配置文件, 若缺少该文件则会创建默认文件, 并尝试从环境变量中加载配置.</p><p>以下是一个最简的配置文件示例:</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-toml data-lang=toml><span style=display:flex><span>[<span style=color:#a6e22e>telegram</span>]
</span></span><span style=display:flex><span><span style=color:#a6e22e>token</span> = <span style=color:#e6db74>&#34;1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZ&#34;</span>
</span></span><span style=display:flex><span>
@@ -139,6 +139,12 @@ SaveAnyBot 需要读取工作目录下的 config.toml 文件作为配置文件,
</span></span><span style=display:flex><span>[<span style=color:#a6e22e>telegram</span>.<span style=color:#a6e22e>userbot</span>]
</span></span><span style=display:flex><span><span style=color:#a6e22e>enable</span> = <span style=color:#66d9ef>false</span>
</span></span><span style=display:flex><span><span style=color:#a6e22e>session</span> = <span style=color:#e6db74>&#34;data/usersession.db&#34;</span>
</span></span></code></pre></div><h3 id=aria2-配置>Aria2 配置
<a class=anchor href=#aria2-%e9%85%8d%e7%bd%ae>#</a></h3><p>Aria2 是一个强大的下载管理器,支持 HTTP/HTTPS、FTP、BitTorrent 等多种协议。启用后Bot 可以使用 <code>/aria2dl</code> 命令通过 Aria2 下载文件。</p><ul><li><code>enable</code>: 是否启用 Aria2 支持,默认为 <code>false</code></li><li><code>url</code>: Aria2 RPC 地址,通常为 <code>http://localhost:6800/jsonrpc</code></li><li><code>secret</code>: Aria2 RPC 密钥,如果你在 Aria2 中配置了 <code>rpc-secret</code>,需要在此填写</li><li><code>remove_after_transfer</code>: 转存完成后是否删除 Aria2 下载的本地文件,默认为 <code>true</code></li></ul><blockquote class="book-hint info">Aria2 需要单独安装和运行。你可以参考 [Aria2 官方文档](https://aria2.github.io/) 了解如何安装和配置 Aria2。</blockquote><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-toml data-lang=toml><span style=display:flex><span>[<span style=color:#a6e22e>aria2</span>]
</span></span><span style=display:flex><span><span style=color:#a6e22e>enable</span> = <span style=color:#66d9ef>true</span>
</span></span><span style=display:flex><span><span style=color:#a6e22e>url</span> = <span style=color:#e6db74>&#34;http://localhost:6800/jsonrpc&#34;</span>
</span></span><span style=display:flex><span><span style=color:#a6e22e>secret</span> = <span style=color:#e6db74>&#34;your-rpc-secret&#34;</span>
</span></span><span style=display:flex><span><span style=color:#a6e22e>remove_after_transfer</span> = <span style=color:#66d9ef>true</span>
</span></span></code></pre></div><h3 id=存储端列表>存储端列表
<a class=anchor href=#%e5%ad%98%e5%82%a8%e7%ab%af%e5%88%97%e8%a1%a8>#</a></h3><p>存储端列表用于定义 Bot 支持的存储位置, 每个存储端需要指定名称、类型和相关配置, 使用双中括号语法 <code>[[storages]]</code> 定义.</p><p>每一个存储端至少需要以下字段:</p><ul><li><code>name</code>: 存储端名称, 用于在 Bot 中识别, 需要唯一</li><li><code>enable</code>: 是否启用该存储端, 默认为 <code>true</code></li><li><code>type</code>: 存储端类型, 目前支持以下类型:<ul><li><code>local</code>: 本地磁盘</li><li><code>alist</code>: Alist</li><li><code>webdav</code>: WebDAV</li><li><code>s3</code>: aws S3 及其他兼容 S3 的服务</li><li><code>telegram</code>: 上传到 Telegram</li></ul></li></ul><p>示例, 这是一个包含本地存储和 webdav 存储的配置:</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-toml data-lang=toml><span style=display:flex><span>[[<span style=color:#a6e22e>storages</span>]]
</span></span><span style=display:flex><span><span style=color:#a6e22e>name</span> = <span style=color:#e6db74>&#34;本地存储&#34;</span>
@@ -185,6 +191,6 @@ SaveAnyBot 需要读取工作目录下的 config.toml 文件作为配置文件,
</span></span><span style=display:flex><span><span style=color:#75715e># 临时下载文件夹配置</span>
</span></span><span style=display:flex><span>[<span style=color:#a6e22e>temp</span>]
</span></span><span style=display:flex><span><span style=color:#a6e22e>base_path</span> = <span style=color:#e6db74>&#34;./cache&#34;</span>
</span></span></code></pre></div></article><footer class=book-footer><div class="flex flex-wrap justify-between"><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/commit/3f914f7a647a047b6d6e159f0fa6ef336955161e title='最后修改者 krau | 2026/01/06' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
<span>2026/01/06</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/zh/deployment/configuration/_index.md target=_blank rel=noopener><img src=/svg/edit.svg class=book-icon alt>
<span>编辑本页</span></a></div></div><script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script></footer><div class=book-comments></div><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav id=TableOfContents><ul><li><a href=#详细配置>详细配置</a><ul><li><a href=#全局配置>全局配置</a></li><li><a href=#telegram-配置>Telegram 配置</a></li><li><a href=#存储端列表>存储端列表</a></li><li><a href=#用户列表>用户列表</a></li><li><a href=#事件触发>事件触发</a></li><li><a href=#解析器>解析器</a></li><li><a href=#杂项>杂项</a></li></ul></li></ul></nav></div></aside></main></body></html>
</span></span></code></pre></div></article><footer class=book-footer><div class="flex flex-wrap justify-between"><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/commit/33a886fac9ff1d63ee44bb246eaad8bb3441035f title='最后修改者 krau | 2026/01/19' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
<span>2026/01/19</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/zh/deployment/configuration/_index.md target=_blank rel=noopener><img src=/svg/edit.svg class=book-icon alt>
<span>编辑本页</span></a></div></div><script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script></footer><div class=book-comments></div><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav id=TableOfContents><ul><li><a href=#详细配置>详细配置</a><ul><li><a href=#全局配置>全局配置</a></li><li><a href=#telegram-配置>Telegram 配置</a></li><li><a href=#aria2-配置>Aria2 配置</a></li><li><a href=#存储端列表>存储端列表</a></li><li><a href=#用户列表>用户列表</a></li><li><a href=#事件触发>事件触发</a></li><li><a href=#解析器>解析器</a></li><li><a href=#杂项>杂项</a></li></ul></li></ul></nav></div></aside></main></body></html>

View File

@@ -9,7 +9,7 @@ SaveAnyBot needs to read a config.toml file in the working directory as its conf
Here is an example of a minimal configuration file:"><meta property="og:locale" content="en"><meta property="og:type" content="website"><title>Configuration Guide | Save Any Bot</title><link rel=icon href=/favicon.png><link rel=manifest href=/manifest.json><link rel=canonical href=https://sabot.unv.app/en/deployment/configuration/><link rel=alternate hreflang=zh href=https://sabot.unv.app/deployment/configuration/ title=配置说明><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous><link rel=alternate type=application/rss+xml href=https://sabot.unv.app/en/deployment/configuration/index.xml title="Save Any Bot"></head><body dir=ltr><input type=checkbox class="hidden toggle" id=menu-control>
<input type=checkbox class="hidden toggle" id=toc-control><main class="container flex"><aside class=book-menu><div class=book-menu-content><nav><h2 class=book-brand><a class="flex align-center" href=/en/><img src=/logo.png alt=Logo class=book-icon><span>Save Any Bot</span></a></h2><ul class=book-languages><li><input type=checkbox id=languages class=toggle>
<label for=languages class=flex><a role=button class="flex flex-auto"><img src=/svg/translate.svg class=book-icon alt=Languages>
English</a></label><ul><li><a href=/deployment/configuration/>简体中文</a></li></ul></li></ul><ul><li><a href=https://github.com/krau/SaveAny-Bot target=_blank rel=noopener>🔗 GitHub</a></li></ul><ul><li><span>Deployment Guide</span><ul><li><a href=/en/deployment/configuration/ class=active>Configuration Guide</a><ul><li><a href=/en/deployment/configuration/storages/>Storage Configuration</a></li></ul></li><li><a href=/en/deployment/installation/>Installation and Updates</a></li></ul></li><li><a href=/en/usage/>Usage</a><ul></ul></li><li><a href=/en/help/>Frequently Asked Questions</a><ul></ul></li><li><a href=/en/contribute/>Contributing</a><ul></ul></li></ul></nav><script>(function(){var e=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script></div></aside><div class=book-page><header class=book-header><div class="flex align-center justify-between"><label for=menu-control><img src=/svg/menu.svg class=book-icon alt=Menu></label><h3>Configuration Guide</h3><label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav id=TableOfContents><ul><li><a href=#detailed-configuration>Detailed Configuration</a><ul><li><a href=#global-configuration>Global Configuration</a></li><li><a href=#telegram-configuration>Telegram Configuration</a></li><li><a href=#storage-endpoints-list>Storage Endpoints List</a></li><li><a href=#user-list>User List</a></li><li><a href=#events>Events</a></li><li><a href=#parsers>Parsers</a></li><li><a href=#miscellaneous>Miscellaneous</a></li></ul></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=configuration-guide>Configuration Guide
English</a></label><ul><li><a href=/deployment/configuration/>简体中文</a></li></ul></li></ul><ul><li><a href=https://github.com/krau/SaveAny-Bot target=_blank rel=noopener>🔗 GitHub</a></li></ul><ul><li><span>Deployment Guide</span><ul><li><a href=/en/deployment/configuration/ class=active>Configuration Guide</a><ul><li><a href=/en/deployment/configuration/storages/>Storage Configuration</a></li></ul></li><li><a href=/en/deployment/installation/>Installation and Updates</a></li></ul></li><li><a href=/en/usage/>Usage</a><ul></ul></li><li><a href=/en/help/>Frequently Asked Questions</a><ul></ul></li><li><a href=/en/contribute/>Contributing</a><ul></ul></li></ul></nav><script>(function(){var e=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script></div></aside><div class=book-page><header class=book-header><div class="flex align-center justify-between"><label for=menu-control><img src=/svg/menu.svg class=book-icon alt=Menu></label><h3>Configuration Guide</h3><label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav id=TableOfContents><ul><li><a href=#detailed-configuration>Detailed Configuration</a><ul><li><a href=#global-configuration>Global Configuration</a></li><li><a href=#telegram-configuration>Telegram Configuration</a></li><li><a href=#aria2-configuration>Aria2 Configuration</a></li><li><a href=#storage-endpoints-list>Storage Endpoints List</a></li><li><a href=#user-list>User List</a></li><li><a href=#events>Events</a></li><li><a href=#parsers>Parsers</a></li><li><a href=#miscellaneous>Miscellaneous</a></li></ul></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=configuration-guide>Configuration Guide
<a class=anchor href=#configuration-guide>#</a></h1><p>SaveAnyBot uses the toml format for its configuration files. You can learn more about toml syntax on the <a href=https://toml.io/>TOML official website</a>.</p><p>SaveAnyBot needs to read a <code>config.toml</code> file in the working directory as its configuration file. If this file is missing, a default file will be created, and the bot will attempt to load configuration from environment variables.</p><p>Here is an example of a minimal configuration file:</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-toml data-lang=toml><span style=display:flex><span>[<span style=color:#a6e22e>telegram</span>]
</span></span><span style=display:flex><span><span style=color:#a6e22e>token</span> = <span style=color:#e6db74>&#34;1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZ&#34;</span>
</span></span><span style=display:flex><span>
@@ -44,6 +44,12 @@ English</a></label><ul><li><a href=/deployment/configuration/>简体中文</a></
</span></span><span style=display:flex><span>[<span style=color:#a6e22e>telegram</span>.<span style=color:#a6e22e>userbot</span>]
</span></span><span style=display:flex><span><span style=color:#a6e22e>enable</span> = <span style=color:#66d9ef>false</span>
</span></span><span style=display:flex><span><span style=color:#a6e22e>session</span> = <span style=color:#e6db74>&#34;data/usersession.db&#34;</span>
</span></span></code></pre></div><h3 id=aria2-configuration>Aria2 Configuration
<a class=anchor href=#aria2-configuration>#</a></h3><p>Aria2 is a powerful download manager that supports HTTP/HTTPS, FTP, BitTorrent, and other protocols. When enabled, the bot can use the <code>/aria2dl</code> command to download files via Aria2.</p><ul><li><code>enable</code>: Whether to enable Aria2 support, default is <code>false</code></li><li><code>url</code>: Aria2 RPC address, typically <code>http://localhost:6800/jsonrpc</code></li><li><code>secret</code>: Aria2 RPC secret, if you configured <code>rpc-secret</code> in Aria2, you need to fill it in here</li><li><code>remove_after_transfer</code>: Whether to remove local files downloaded by Aria2 after transfer, default is <code>true</code></li></ul><blockquote class="book-hint info">Aria2 needs to be installed and running separately. You can refer to the [Aria2 official documentation](https://aria2.github.io/) to learn how to install and configure Aria2.</blockquote><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-toml data-lang=toml><span style=display:flex><span>[<span style=color:#a6e22e>aria2</span>]
</span></span><span style=display:flex><span><span style=color:#a6e22e>enable</span> = <span style=color:#66d9ef>true</span>
</span></span><span style=display:flex><span><span style=color:#a6e22e>url</span> = <span style=color:#e6db74>&#34;http://localhost:6800/jsonrpc&#34;</span>
</span></span><span style=display:flex><span><span style=color:#a6e22e>secret</span> = <span style=color:#e6db74>&#34;your-rpc-secret&#34;</span>
</span></span><span style=display:flex><span><span style=color:#a6e22e>remove_after_transfer</span> = <span style=color:#66d9ef>true</span>
</span></span></code></pre></div><h3 id=storage-endpoints-list>Storage Endpoints List
<a class=anchor href=#storage-endpoints-list>#</a></h3><p>The storage endpoints list is used to define the storage locations supported by the Bot. Each storage endpoint needs to specify a name, type, and related configuration, using the double bracket syntax <code>[[storages]]</code>.</p><p>Each storage endpoint requires at least the following fields:</p><ul><li><code>name</code>: Storage endpoint name, used for identification in the Bot, must be unique.</li><li><code>enable</code>: Whether to enable this storage endpoint, default is <code>true</code>.</li><li><code>type</code>: Storage endpoint type, currently supports the following types:<ul><li><code>local</code>: Local disk</li><li><code>alist</code>: Alist</li><li><code>webdav</code>: WebDAV</li><li><code>s3</code>: aws S3 and other S3 compatible services</li><li><code>telegram</code>: Upload to Telegram</li></ul></li></ul><p>Example, this is a configuration that includes local storage and webdav storage:</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-toml data-lang=toml><span style=display:flex><span>[[<span style=color:#a6e22e>storages</span>]]
</span></span><span style=display:flex><span><span style=color:#a6e22e>name</span> = <span style=color:#e6db74>&#34;Local Storage&#34;</span>
@@ -90,6 +96,6 @@ English</a></label><ul><li><a href=/deployment/configuration/>简体中文</a></
</span></span><span style=display:flex><span><span style=color:#75715e># Temporary download folder configuration</span>
</span></span><span style=display:flex><span>[<span style=color:#a6e22e>temp</span>]
</span></span><span style=display:flex><span><span style=color:#a6e22e>base_path</span> = <span style=color:#e6db74>&#34;./cache&#34;</span>
</span></span></code></pre></div></article><footer class=book-footer><div class="flex flex-wrap justify-between"><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/commit/3f914f7a647a047b6d6e159f0fa6ef336955161e title='Last modified by krau | 2026/01/06' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
<span>2026/01/06</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/deployment/configuration/_index.md target=_blank rel=noopener><img src=/svg/edit.svg class=book-icon alt>
<span>Edit this page</span></a></div></div><script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script></footer><div class=book-comments></div><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav id=TableOfContents><ul><li><a href=#detailed-configuration>Detailed Configuration</a><ul><li><a href=#global-configuration>Global Configuration</a></li><li><a href=#telegram-configuration>Telegram Configuration</a></li><li><a href=#storage-endpoints-list>Storage Endpoints List</a></li><li><a href=#user-list>User List</a></li><li><a href=#events>Events</a></li><li><a href=#parsers>Parsers</a></li><li><a href=#miscellaneous>Miscellaneous</a></li></ul></li></ul></nav></div></aside></main></body></html>
</span></span></code></pre></div></article><footer class=book-footer><div class="flex flex-wrap justify-between"><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/commit/33a886fac9ff1d63ee44bb246eaad8bb3441035f title='Last modified by krau | 2026/01/19' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
<span>2026/01/19</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/deployment/configuration/_index.md target=_blank rel=noopener><img src=/svg/edit.svg class=book-icon alt>
<span>Edit this page</span></a></div></div><script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script></footer><div class=book-comments></div><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav id=TableOfContents><ul><li><a href=#detailed-configuration>Detailed Configuration</a><ul><li><a href=#global-configuration>Global Configuration</a></li><li><a href=#telegram-configuration>Telegram Configuration</a></li><li><a href=#aria2-configuration>Aria2 Configuration</a></li><li><a href=#storage-endpoints-list>Storage Endpoints List</a></li><li><a href=#user-list>User List</a></li><li><a href=#events>Events</a></li><li><a href=#parsers>Parsers</a></li><li><a href=#miscellaneous>Miscellaneous</a></li></ul></li></ul></nav></div></aside></main></body></html>

View File

@@ -19,6 +19,9 @@ Streaming
Multi-user
Automatic organization based on storage rules
Watch specific chats and automatically save messages, with filters
Transfer files between different storage backends
Integrate with yt-dlp to download and save media from 1000+ websites
Aria2 integration to download files from URLs/magnets and save to storages
Write JS parser plugins to save files from almost any website
Supports multiple storage backends:
@@ -35,7 +38,7 @@ Telegram (re-upload to specified chat)
#
"><meta name=theme-color media="(prefers-color-scheme: light)" content="#ffffff"><meta name=theme-color media="(prefers-color-scheme: dark)" content="#343a40"><meta name=color-scheme content="light dark"><meta property="og:url" content="https://sabot.unv.app/en/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="Introduction"><meta property="og:description" content="Save Any Bot # Save Any Bot is a tool that allows you to save files from Telegram to various storage backends.
🎯 Features # Supports documents/videos/images/stickers… and even Telegraph Breaks restrictions on saving files Batch download Streaming Multi-user Automatic organization based on storage rules Watch specific chats and automatically save messages, with filters Write JS parser plugins to save files from almost any website Supports multiple storage backends: Alist S3 WebDAV Local disk Telegram (re-upload to specified chat) Contributors #"><meta property="og:locale" content="en"><meta property="og:type" content="website"><title>Introduction | Save Any Bot</title><link rel=icon href=/favicon.png><link rel=manifest href=/manifest.json><link rel=canonical href=https://sabot.unv.app/en/><link rel=alternate hreflang=zh href=https://sabot.unv.app/ title=介绍><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous><link rel=alternate type=application/rss+xml href=https://sabot.unv.app/en/index.xml title="Save Any Bot"></head><body dir=ltr><input type=checkbox class="hidden toggle" id=menu-control>
🎯 Features # Supports documents/videos/images/stickers… and even Telegraph Breaks restrictions on saving files Batch download Streaming Multi-user Automatic organization based on storage rules Watch specific chats and automatically save messages, with filters Transfer files between different storage backends Integrate with yt-dlp to download and save media from 1000+ websites Aria2 integration to download files from URLs/magnets and save to storages Write JS parser plugins to save files from almost any website Supports multiple storage backends: Alist S3 WebDAV Local disk Telegram (re-upload to specified chat) Contributors #"><meta property="og:locale" content="en"><meta property="og:type" content="website"><title>Introduction | Save Any Bot</title><link rel=icon href=/favicon.png><link rel=manifest href=/manifest.json><link rel=canonical href=https://sabot.unv.app/en/><link rel=alternate hreflang=zh href=https://sabot.unv.app/ title=介绍><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous><link rel=alternate type=application/rss+xml href=https://sabot.unv.app/en/index.xml title="Save Any Bot"></head><body dir=ltr><input type=checkbox class="hidden toggle" id=menu-control>
<input type=checkbox class="hidden toggle" id=toc-control><main class="container flex"><aside class=book-menu><div class=book-menu-content><nav><h2 class=book-brand><a class="flex align-center" href=/en/><img src=/logo.png alt=Logo class=book-icon><span>Save Any Bot</span></a></h2><ul class=book-languages><li><input type=checkbox id=languages class=toggle>
<label for=languages class=flex><a role=button class="flex flex-auto"><img src=/svg/translate.svg class=book-icon alt=Languages>
English</a></label><ul><li><a href=/>简体中文</a></li></ul></li></ul><ul><li><a href=https://github.com/krau/SaveAny-Bot target=_blank rel=noopener>🔗 GitHub</a></li></ul><ul><li><span>Deployment Guide</span><ul><li><a href=/en/deployment/configuration/>Configuration Guide</a><ul><li><a href=/en/deployment/configuration/storages/>Storage Configuration</a></li></ul></li><li><a href=/en/deployment/installation/>Installation and Updates</a></li></ul></li><li><a href=/en/usage/>Usage</a><ul></ul></li><li><a href=/en/help/>Frequently Asked Questions</a><ul></ul></li><li><a href=/en/contribute/>Contributing</a><ul></ul></li></ul></nav><script>(function(){var e=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script></div></aside><div class=book-page><header class=book-header><div class="flex align-center justify-between"><label for=menu-control><img src=/svg/menu.svg class=book-icon alt=Menu></label><h3>Introduction</h3><label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav id=TableOfContents><ul><li><a href=#-features>🎯 Features</a></li><li><a href=#contributors><a href=https://github.com/krau/SaveAny-Bot/graphs/contributors>Contributors</a></a></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=save-any-bot>Save Any Bot
@@ -43,7 +46,7 @@ English</a></label><ul><li><a href=/>简体中文</a></li></ul></li></ul><ul><li
<img src="https://img.shields.io/github/license/krau/SaveAny-Bot?style=flat-square" alt>
<img src="https://img.shields.io/github/v/release/krau/SaveAny-Bot?color=cyan&amp;style=flat-square" alt>
<img src="https://img.shields.io/github/downloads/krau/SaveAny-Bot/total?style=flat-square" alt></p><p>Save Any Bot is a tool that allows you to save files from Telegram to various storage backends.</p><h2 id=-features>🎯 Features
<a class=anchor href=#-features>#</a></h2><ul><li>Supports documents/videos/images/stickers&mldr; and even <a href=https://telegra.ph/>Telegraph</a></li><li>Breaks restrictions on saving files</li><li>Batch download</li><li>Streaming</li><li>Multi-user</li><li>Automatic organization based on storage rules</li><li>Watch specific chats and automatically save messages, with filters</li><li>Write JS parser plugins to save files from almost any website</li><li>Supports multiple storage backends:<ul><li>Alist</li><li>S3</li><li>WebDAV</li><li>Local disk</li><li>Telegram (re-upload to specified chat)</li></ul></li></ul><h2 id=contributors><a href=https://github.com/krau/SaveAny-Bot/graphs/contributors>Contributors</a>
<a class=anchor href=#contributors>#</a></h2><p><img src="https://contrib.rocks/image?repo=krau/SaveAny-Bot&amp;max=750&amp;columns=20" alt=Contributors></p></article><footer class=book-footer><div class="flex flex-wrap justify-between"><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/commit/95f7d5abb5f63536b1ff008f95689cce69ce4253 title='Last modified by krau | 2025/12/19' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
<span>2025/12/19</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/_index.md target=_blank rel=noopener><img src=/svg/edit.svg class=book-icon alt>
<a class=anchor href=#-features>#</a></h2><ul><li>Supports documents/videos/images/stickers&mldr; and even <a href=https://telegra.ph/>Telegraph</a></li><li>Breaks restrictions on saving files</li><li>Batch download</li><li>Streaming</li><li>Multi-user</li><li>Automatic organization based on storage rules</li><li>Watch specific chats and automatically save messages, with filters</li><li>Transfer files between different storage backends</li><li>Integrate with yt-dlp to download and save media from 1000+ websites</li><li>Aria2 integration to download files from URLs/magnets and save to storages</li><li>Write JS parser plugins to save files from almost any website</li><li>Supports multiple storage backends:<ul><li>Alist</li><li>S3</li><li>WebDAV</li><li>Local disk</li><li>Telegram (re-upload to specified chat)</li></ul></li></ul><h2 id=contributors><a href=https://github.com/krau/SaveAny-Bot/graphs/contributors>Contributors</a>
<a class=anchor href=#contributors>#</a></h2><p><img src="https://contrib.rocks/image?repo=krau/SaveAny-Bot&amp;max=750&amp;columns=20" alt=Contributors></p></article><footer class=book-footer><div class="flex flex-wrap justify-between"><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/commit/33a886fac9ff1d63ee44bb246eaad8bb3441035f title='Last modified by krau | 2026/01/19' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
<span>2026/01/19</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/_index.md target=_blank rel=noopener><img src=/svg/edit.svg class=book-icon alt>
<span>Edit this page</span></a></div></div><script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script></footer><div class=book-comments></div><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav id=TableOfContents><ul><li><a href=#-features>🎯 Features</a></li><li><a href=#contributors><a href=https://github.com/krau/SaveAny-Bot/graphs/contributors>Contributors</a></a></li></ul></nav></div></aside></main></body></html>

View File

@@ -1 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>https://sabot.unv.app/en/deployment/</loc><lastmod>2025-06-16T16:30:45+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/"/></url><url><loc>https://sabot.unv.app/en/usage/</loc><lastmod>2025-12-19T21:03:58+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/usage/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/usage/"/></url><url><loc>https://sabot.unv.app/en/help/</loc><lastmod>2025-06-16T16:30:45+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/help/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/help/"/></url><url><loc>https://sabot.unv.app/en/contribute/</loc><lastmod>2025-12-19T21:03:58+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/contribute/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/contribute/"/></url><url><loc>https://sabot.unv.app/en/categories/</loc><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/categories/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/categories/"/></url><url><loc>https://sabot.unv.app/en/deployment/configuration/</loc><lastmod>2026-01-06T09:35:21+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/configuration/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/configuration/"/></url><url><loc>https://sabot.unv.app/en/deployment/installation/</loc><lastmod>2026-01-05T11:56:19+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/installation/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/installation/"/></url><url><loc>https://sabot.unv.app/en/</loc><lastmod>2025-12-19T21:03:58+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/"/></url><url><loc>https://sabot.unv.app/en/deployment/configuration/storages/</loc><lastmod>2025-12-19T21:03:58+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/configuration/storages/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/configuration/storages/"/></url><url><loc>https://sabot.unv.app/en/tags/</loc><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/tags/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/tags/"/></url></urlset>
<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>https://sabot.unv.app/en/deployment/</loc><lastmod>2025-06-16T16:30:45+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/"/></url><url><loc>https://sabot.unv.app/en/usage/</loc><lastmod>2026-01-19T21:55:26+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/usage/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/usage/"/></url><url><loc>https://sabot.unv.app/en/help/</loc><lastmod>2025-06-16T16:30:45+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/help/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/help/"/></url><url><loc>https://sabot.unv.app/en/contribute/</loc><lastmod>2025-12-19T21:03:58+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/contribute/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/contribute/"/></url><url><loc>https://sabot.unv.app/en/categories/</loc><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/categories/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/categories/"/></url><url><loc>https://sabot.unv.app/en/deployment/configuration/</loc><lastmod>2026-01-19T21:55:26+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/configuration/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/configuration/"/></url><url><loc>https://sabot.unv.app/en/deployment/installation/</loc><lastmod>2026-01-05T11:56:19+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/installation/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/installation/"/></url><url><loc>https://sabot.unv.app/en/</loc><lastmod>2026-01-19T21:55:26+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/"/></url><url><loc>https://sabot.unv.app/en/deployment/configuration/storages/</loc><lastmod>2025-12-19T21:03:58+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/configuration/storages/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/configuration/storages/"/></url><url><loc>https://sabot.unv.app/en/tags/</loc><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/tags/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/tags/"/></url></urlset>

View File

@@ -22,7 +22,7 @@ File Transfer # To use the bots Telegram file saving feature, you need to sen
File or media messages, such as images, videos, documents, etc. Telegram message links, for example: https://t.me/acherkrau/1097. Even if the channel prohibits forwarding and saving, the bot can still download its files. Telegra.ph article links. The bot will download all images in the article. Silent Mode (silent) # Use the /silent command to toggle silent mode."><meta property="og:locale" content="en"><meta property="og:type" content="website"><title>Usage | Save Any Bot</title><link rel=icon href=/favicon.png><link rel=manifest href=/manifest.json><link rel=canonical href=https://sabot.unv.app/en/usage/><link rel=alternate hreflang=zh href=https://sabot.unv.app/usage/ title=使用帮助><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous><link rel=alternate type=application/rss+xml href=https://sabot.unv.app/en/usage/index.xml title="Save Any Bot"></head><body dir=ltr><input type=checkbox class="hidden toggle" id=menu-control>
<input type=checkbox class="hidden toggle" id=toc-control><main class="container flex"><aside class=book-menu><div class=book-menu-content><nav><h2 class=book-brand><a class="flex align-center" href=/en/><img src=/logo.png alt=Logo class=book-icon><span>Save Any Bot</span></a></h2><ul class=book-languages><li><input type=checkbox id=languages class=toggle>
<label for=languages class=flex><a role=button class="flex flex-auto"><img src=/svg/translate.svg class=book-icon alt=Languages>
English</a></label><ul><li><a href=/usage/>简体中文</a></li></ul></li></ul><ul><li><a href=https://github.com/krau/SaveAny-Bot target=_blank rel=noopener>🔗 GitHub</a></li></ul><ul><li><span>Deployment Guide</span><ul><li><a href=/en/deployment/configuration/>Configuration Guide</a><ul><li><a href=/en/deployment/configuration/storages/>Storage Configuration</a></li></ul></li><li><a href=/en/deployment/installation/>Installation and Updates</a></li></ul></li><li><a href=/en/usage/ class=active>Usage</a><ul></ul></li><li><a href=/en/help/>Frequently Asked Questions</a><ul></ul></li><li><a href=/en/contribute/>Contributing</a><ul></ul></li></ul></nav><script>(function(){var e=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script></div></aside><div class=book-page><header class=book-header><div class="flex align-center justify-between"><label for=menu-control><img src=/svg/menu.svg class=book-icon alt=Menu></label><h3>Usage</h3><label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav id=TableOfContents><ul><li><a href=#file-transfer>File Transfer</a></li><li><a href=#silent-mode-silent>Silent Mode (silent)</a></li><li><a href=#storage-rules>Storage Rules</a><ul><li><a href=#filename-regex>FILENAME-REGEX</a></li><li><a href=#message-regex>MESSAGE-REGEX</a></li><li><a href=#is-album>IS-ALBUM</a></li></ul></li><li><a href=#watch-chats>Watch Chats</a><ul><li><a href=#msgre>msgre</a></li></ul></li><li><a href=#save-files-outside-telegram>Save Files Outside Telegram</a></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=usage>Usage
English</a></label><ul><li><a href=/usage/>简体中文</a></li></ul></li></ul><ul><li><a href=https://github.com/krau/SaveAny-Bot target=_blank rel=noopener>🔗 GitHub</a></li></ul><ul><li><span>Deployment Guide</span><ul><li><a href=/en/deployment/configuration/>Configuration Guide</a><ul><li><a href=/en/deployment/configuration/storages/>Storage Configuration</a></li></ul></li><li><a href=/en/deployment/installation/>Installation and Updates</a></li></ul></li><li><a href=/en/usage/ class=active>Usage</a><ul></ul></li><li><a href=/en/help/>Frequently Asked Questions</a><ul></ul></li><li><a href=/en/contribute/>Contributing</a><ul></ul></li></ul></nav><script>(function(){var e=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script></div></aside><div class=book-page><header class=book-header><div class="flex align-center justify-between"><label for=menu-control><img src=/svg/menu.svg class=book-icon alt=Menu></label><h3>Usage</h3><label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav id=TableOfContents><ul><li><a href=#file-transfer>File Transfer</a></li><li><a href=#silent-mode-silent>Silent Mode (silent)</a></li><li><a href=#storage-rules>Storage Rules</a><ul><li><a href=#filename-regex>FILENAME-REGEX</a></li><li><a href=#message-regex>MESSAGE-REGEX</a></li><li><a href=#is-album>IS-ALBUM</a></li></ul></li><li><a href=#watch-chats>Watch Chats</a><ul><li><a href=#msgre>msgre</a></li></ul></li><li><a href=#direct-download-links>Direct Download Links</a></li><li><a href=#aria2-download>Aria2 Download</a></li><li><a href=#yt-dlp-video-download>yt-dlp Video Download</a></li><li><a href=#storage-transfer>Storage Transfer</a></li><li><a href=#save-files-outside-telegram>Save Files Outside Telegram</a></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=usage>Usage
<a class=anchor href=#usage>#</a></h1><p>This page introduces some of Save Any Bot&rsquo;s features and basic usage. If you can&rsquo;t find what you need here, please also see the <a href=../deployment/configuration>Configuration Guide</a> or ask in GitHub <a href=https://github.com/krau/SaveAny-Bot/discussions>Discussions</a>.</p><h2 id=file-transfer>File Transfer
<a class=anchor href=#file-transfer>#</a></h2><p>To use the bot&rsquo;s Telegram file saving feature, you need to send or forward the following types of messages to the bot:</p><ol><li>File or media messages, such as images, videos, documents, etc.</li><li>Telegram message links, for example: <code>https://t.me/acherkrau/1097</code>. <strong>Even if the channel prohibits forwarding and saving, the bot can still download its files.</strong></li><li>Telegra.ph article links. The bot will download all images in the article.</li></ol><h2 id=silent-mode-silent>Silent Mode (silent)
<a class=anchor href=#silent-mode-silent>#</a></h2><p>Use the <code>/silent</code> command to toggle silent mode.</p><p>By default, silent mode is off, and the bot will ask you for the save location of each file.</p><p>When silent mode is enabled, the bot will save files directly to the default location without confirmation.</p><p>Before enabling silent mode, you need to set the default save location using the <code>/storage</code> command.</p><h2 id=storage-rules>Storage Rules
@@ -37,7 +37,50 @@ English</a></label><ul><li><a href=/usage/>简体中文</a></li></ul></li></ul><
</code></pre><p>Stop watching:</p><pre tabindex=0><code>/unwatch &lt;chat_id/username&gt;
</code></pre><p>Filter types:</p><h3 id=msgre>msgre
<a class=anchor href=#msgre>#</a></h3><p>Regex-match the message text. For example:</p><pre tabindex=0><code>/watch 12345678 msgre:.*hello.*
</code></pre><p>This will watch the chat with ID <code>12345678</code>, and only save messages whose text contains <code>hello</code>.</p><h2 id=save-files-outside-telegram>Save Files Outside Telegram
<a class=anchor href=#save-files-outside-telegram>#</a></h2><p>Besides files on Telegram, the bot can also save files from other websites via JavaScript plugins or built-in parsers.</p><blockquote><p>See the <a href=../contribute>Contributing Parsers</a> document for details.</p></blockquote><p>Just send links that match the requirements of a parser to the bot. Currently built-in parsers include:</p><ul><li>Twitter</li><li>Kemono</li></ul></article><footer class=book-footer><div class="flex flex-wrap justify-between"><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/commit/95f7d5abb5f63536b1ff008f95689cce69ce4253 title='Last modified by krau | 2025/12/19' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
<span>2025/12/19</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/usage/_index.md target=_blank rel=noopener><img src=/svg/edit.svg class=book-icon alt>
<span>Edit this page</span></a></div></div><script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script></footer><div class=book-comments></div><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav id=TableOfContents><ul><li><a href=#file-transfer>File Transfer</a></li><li><a href=#silent-mode-silent>Silent Mode (silent)</a></li><li><a href=#storage-rules>Storage Rules</a><ul><li><a href=#filename-regex>FILENAME-REGEX</a></li><li><a href=#message-regex>MESSAGE-REGEX</a></li><li><a href=#is-album>IS-ALBUM</a></li></ul></li><li><a href=#watch-chats>Watch Chats</a><ul><li><a href=#msgre>msgre</a></li></ul></li><li><a href=#save-files-outside-telegram>Save Files Outside Telegram</a></li></ul></nav></div></aside></main></body></html>
</code></pre><p>This will watch the chat with ID <code>12345678</code>, and only save messages whose text contains <code>hello</code>.</p><h2 id=direct-download-links>Direct Download Links
<a class=anchor href=#direct-download-links>#</a></h2><p>Use the <code>/dl</code> command to directly download one or more HTTP/HTTPS files to storage.</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>/dl &lt;url1&gt; <span style=color:#f92672>[</span>url2<span style=color:#f92672>]</span> <span style=color:#f92672>[</span>url3<span style=color:#f92672>]</span> ...
</span></span></code></pre></div><p>Examples:</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>/dl https://example.com/file.zip
</span></span><span style=display:flex><span>/dl https://example.com/file1.zip https://example.com/file2.zip
</span></span></code></pre></div><p>The bot will validate the link format and then ask you to select the target storage location.</p><h2 id=aria2-download>Aria2 Download
<a class=anchor href=#aria2-download>#</a></h2><blockquote class="book-hint warning">This feature requires enabling Aria2 in the configuration file and configuring the RPC connection.</blockquote><p>Use the <code>/aria2dl</code> command to download files via the Aria2 download manager, supporting HTTP/HTTPS, FTP, BitTorrent, and other protocols.</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>/aria2dl &lt;uri1&gt; <span style=color:#f92672>[</span>uri2<span style=color:#f92672>]</span> <span style=color:#f92672>[</span>uri3<span style=color:#f92672>]</span> ...
</span></span></code></pre></div><p>Examples:</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#75715e># Download HTTP link</span>
</span></span><span style=display:flex><span>/aria2dl https://example.com/file.zip
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#75715e># Download magnet link</span>
</span></span><span style=display:flex><span>/aria2dl magnet:?xt<span style=color:#f92672>=</span>urn:btih:...
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#75715e># Download torrent file (need to upload .torrent file first)</span>
</span></span><span style=display:flex><span>/aria2dl https://example.com/file.torrent
</span></span></code></pre></div><p>Configure Aria2:</p><p>Add to <code>config.toml</code>:</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-toml data-lang=toml><span style=display:flex><span>[<span style=color:#a6e22e>aria2</span>]
</span></span><span style=display:flex><span><span style=color:#a6e22e>enable</span> = <span style=color:#66d9ef>true</span>
</span></span><span style=display:flex><span><span style=color:#a6e22e>url</span> = <span style=color:#e6db74>&#34;http://localhost:6800/jsonrpc&#34;</span>
</span></span><span style=display:flex><span><span style=color:#a6e22e>secret</span> = <span style=color:#e6db74>&#34;your-rpc-secret&#34;</span> <span style=color:#75715e># If rpc-secret is configured</span>
</span></span><span style=display:flex><span><span style=color:#a6e22e>remove_after_transfer</span> = <span style=color:#66d9ef>true</span> <span style=color:#75715e># Remove local files after transfer</span>
</span></span></code></pre></div><h2 id=yt-dlp-video-download>yt-dlp Video Download
<a class=anchor href=#yt-dlp-video-download>#</a></h2><blockquote class="book-hint warning">This feature requires the yt-dlp command-line tool installed on your system.</blockquote><p>Use the <code>/ytdlp</code> command to download videos and audio from supported video websites, including YouTube, Bilibili, Twitter, and 1000+ other sites.</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>/ytdlp &lt;url1&gt; <span style=color:#f92672>[</span>url2<span style=color:#f92672>]</span> <span style=color:#f92672>[</span>flags...<span style=color:#f92672>]</span>
</span></span></code></pre></div><p>Examples:</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#75715e># Basic download</span>
</span></span><span style=display:flex><span>/ytdlp https://www.youtube.com/watch?v<span style=color:#f92672>=</span>dQw4w9WgXcQ
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#75715e># Download multiple videos</span>
</span></span><span style=display:flex><span>/ytdlp https://www.youtube.com/watch?v<span style=color:#f92672>=</span>video1 https://www.youtube.com/watch?v<span style=color:#f92672>=</span>video2
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#75715e># Use custom parameters</span>
</span></span><span style=display:flex><span>/ytdlp https://www.youtube.com/watch?v<span style=color:#f92672>=</span>dQw4w9WgXcQ -f best
</span></span><span style=display:flex><span>/ytdlp https://www.youtube.com/watch?v<span style=color:#f92672>=</span>dQw4w9WgXcQ --extract-audio --audio-format mp3
</span></span></code></pre></div><p>Common parameters:</p><ul><li><code>-f &lt;format></code>: Specify download format (e.g., <code>best</code>, <code>worst</code>, <code>bestvideo+bestaudio</code>)</li><li><code>--extract-audio</code>: Extract audio</li><li><code>--audio-format &lt;format></code>: Audio format (e.g., <code>mp3</code>, <code>m4a</code>, <code>wav</code>)</li><li><code>--write-sub</code>: Download subtitles</li><li><code>--write-thumbnail</code>: Download thumbnail</li></ul><p>For more parameters, see <a href=https://github.com/yt-dlp/yt-dlp#usage-and-options>yt-dlp documentation</a>.</p><h2 id=storage-transfer>Storage Transfer
<a class=anchor href=#storage-transfer>#</a></h2><p>Use the <code>/transfer</code> command to transfer files directly between different storages without going through Telegram.</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>/transfer &lt;source_storage&gt;:/&lt;source_path&gt; <span style=color:#f92672>[</span>filter<span style=color:#f92672>]</span>
</span></span></code></pre></div><p>Parameters:</p><ul><li><code>source_storage</code>: Source storage name</li><li><code>source_path</code>: Source path</li><li><code>filter</code>: Optional regex filter to transfer only matching files</li></ul><p>Examples:</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#75715e># Transfer entire directory</span>
</span></span><span style=display:flex><span>/transfer local1:/downloads
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#75715e># Transfer files from specified path</span>
</span></span><span style=display:flex><span>/transfer alist1:/media/photos
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#75715e># Transfer only mp4 files</span>
</span></span><span style=display:flex><span>/transfer webdav1:/videos <span style=color:#e6db74>&#34;.*\.mp4</span>$<span style=color:#e6db74>&#34;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#75715e># Transfer image files</span>
</span></span><span style=display:flex><span>/transfer local1:/pictures <span style=color:#e6db74>&#34;(?i)\.(jpg|png|gif)</span>$<span style=color:#e6db74>&#34;</span>
</span></span></code></pre></div><p>The bot will:</p><ol><li>List all files in the source path</li><li>Apply the filter (if provided)</li><li>Display file count and total size</li><li>Ask you to select the target storage</li><li>Ask you to select the target directory (if configured for that storage)</li><li>Start the transfer task</li></ol><p>Notes:</p><ul><li>Source storage must support listing and reading</li><li>Target storage must support writing</li><li>Real-time progress is displayed during transfer</li><li>Transfer tasks can be cancelled</li></ul><h2 id=save-files-outside-telegram>Save Files Outside Telegram
<a class=anchor href=#save-files-outside-telegram>#</a></h2><p>Besides files on Telegram, the bot can also save files from other websites via JavaScript plugins or built-in parsers.</p><blockquote><p>See the <a href=../contribute>Contributing Parsers</a> document for details.</p></blockquote><p>Just send links that match the requirements of a parser to the bot. Currently built-in parsers include:</p><ul><li>Twitter</li><li>Kemono</li></ul></article><footer class=book-footer><div class="flex flex-wrap justify-between"><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/commit/33a886fac9ff1d63ee44bb246eaad8bb3441035f title='Last modified by krau | 2026/01/19' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
<span>2026/01/19</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/usage/_index.md target=_blank rel=noopener><img src=/svg/edit.svg class=book-icon alt>
<span>Edit this page</span></a></div></div><script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script></footer><div class=book-comments></div><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav id=TableOfContents><ul><li><a href=#file-transfer>File Transfer</a></li><li><a href=#silent-mode-silent>Silent Mode (silent)</a></li><li><a href=#storage-rules>Storage Rules</a><ul><li><a href=#filename-regex>FILENAME-REGEX</a></li><li><a href=#message-regex>MESSAGE-REGEX</a></li><li><a href=#is-album>IS-ALBUM</a></li></ul></li><li><a href=#watch-chats>Watch Chats</a><ul><li><a href=#msgre>msgre</a></li></ul></li><li><a href=#direct-download-links>Direct Download Links</a></li><li><a href=#aria2-download>Aria2 Download</a></li><li><a href=#yt-dlp-video-download>yt-dlp Video Download</a></li><li><a href=#storage-transfer>Storage Transfer</a></li><li><a href=#save-files-outside-telegram>Save Files Outside Telegram</a></li></ul></nav></div></aside></main></body></html>

View File

@@ -19,6 +19,9 @@
多用户使用
基于存储规则的自动整理
监听并自动转存指定聊天的消息, 支持过滤
在不同存储端之间转存文件
集成 yt-dlp, 从所支持的网站下载并转存媒体文件
集成 Aria2, 支持直链/磁力下载和转存
使用 js 编写解析器插件以转存任意网站的文件
存储端支持:
@@ -35,7 +38,7 @@ Telegram (重传回指定聊天)
#
"><meta name=theme-color media="(prefers-color-scheme: light)" content="#ffffff"><meta name=theme-color media="(prefers-color-scheme: dark)" content="#343a40"><meta name=color-scheme content="light dark"><meta property="og:url" content="https://sabot.unv.app/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="介绍"><meta property="og:description" content="Save Any Bot # 把 Telegram 上的文件转存到多种存储端.
🎯 特性 # 支持文档/视频/图片/贴纸…甚至还有 Telegraph 破解禁止保存的文件 批量下载 流式传输 多用户使用 基于存储规则的自动整理 监听并自动转存指定聊天的消息, 支持过滤 使用 js 编写解析器插件以转存任意网站的文件 存储端支持: Alist S3 WebDAV 本地磁盘 Telegram (重传回指定聊天) 贡献者 #"><meta property="og:locale" content="zh"><meta property="og:type" content="website"><title>介绍 | Save Any Bot</title><link rel=icon href=/favicon.png><link rel=manifest href=/manifest.json><link rel=canonical href=https://sabot.unv.app/><link rel=alternate hreflang=en href=https://sabot.unv.app/en/ title=Introduction><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous><link rel=alternate type=application/rss+xml href=https://sabot.unv.app/index.xml title="Save Any Bot"></head><body dir=ltr><input type=checkbox class="hidden toggle" id=menu-control>
🎯 特性 # 支持文档/视频/图片/贴纸…甚至还有 Telegraph 破解禁止保存的文件 批量下载 流式传输 多用户使用 基于存储规则的自动整理 监听并自动转存指定聊天的消息, 支持过滤 在不同存储端之间转存文件 集成 yt-dlp, 从所支持的网站下载并转存媒体文件 集成 Aria2, 支持直链/磁力下载和转存 使用 js 编写解析器插件以转存任意网站的文件 存储端支持: Alist S3 WebDAV 本地磁盘 Telegram (重传回指定聊天) 贡献者 #"><meta property="og:locale" content="zh"><meta property="og:type" content="website"><title>介绍 | Save Any Bot</title><link rel=icon href=/favicon.png><link rel=manifest href=/manifest.json><link rel=canonical href=https://sabot.unv.app/><link rel=alternate hreflang=en href=https://sabot.unv.app/en/ title=Introduction><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous><link rel=alternate type=application/rss+xml href=https://sabot.unv.app/index.xml title="Save Any Bot"></head><body dir=ltr><input type=checkbox class="hidden toggle" id=menu-control>
<input type=checkbox class="hidden toggle" id=toc-control><main class="container flex"><aside class=book-menu><div class=book-menu-content><nav><h2 class=book-brand><a class="flex align-center" href=/><img src=/logo.png alt=Logo class=book-icon><span>Save Any Bot</span></a></h2><ul class=book-languages><li><input type=checkbox id=languages class=toggle>
<label for=languages class=flex><a role=button class="flex flex-auto"><img src=/svg/translate.svg class=book-icon alt=Languages>
简体中文</a></label><ul><li><a href=/en/>English</a></li></ul></li></ul><ul><li><a href=https://github.com/krau/SaveAny-Bot target=_blank rel=noopener>🔗 GitHub</a></li></ul><ul><li><span>部署指南</span><ul><li><a href=/deployment/installation/>安装与更新</a></li><li><a href=/deployment/configuration/>配置说明</a><ul><li><a href=/deployment/configuration/storages/>存储端配置</a></li></ul></li></ul></li><li><a href=/usage/>使用帮助</a><ul></ul></li><li><a href=/help/>常见问题</a><ul></ul></li><li><a href=/contribute/>参与开发</a><ul></ul></li></ul></nav><script>(function(){var e=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script></div></aside><div class=book-page><header class=book-header><div class="flex align-center justify-between"><label for=menu-control><img src=/svg/menu.svg class=book-icon alt=Menu></label><h3>介绍</h3><label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav id=TableOfContents><ul><li><a href=#-特性>🎯 特性</a></li><li><a href=#贡献者><a href=https://github.com/krau/SaveAny-Bot/graphs/contributors>贡献者</a></a></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=save-any-bot>Save Any Bot
@@ -43,7 +46,7 @@ Telegram (重传回指定聊天)
<img src="https://img.shields.io/github/license/krau/SaveAny-Bot?style=flat-square" alt>
<img src="https://img.shields.io/github/v/release/krau/SaveAny-Bot?color=cyan&amp;style=flat-square" alt>
<img src="https://img.shields.io/github/downloads/krau/SaveAny-Bot/total?style=flat-square" alt></p><p>把 Telegram 上的文件转存到多种存储端.</p><h2 id=-特性>🎯 特性
<a class=anchor href=#-%e7%89%b9%e6%80%a7>#</a></h2><ul><li>支持文档/视频/图片/贴纸…甚至还有 <a href=https://telegra.ph/>Telegraph</a></li><li>破解禁止保存的文件</li><li>批量下载</li><li>流式传输</li><li>多用户使用</li><li>基于存储规则的自动整理</li><li>监听并自动转存指定聊天的消息, 支持过滤</li><li>使用 js 编写解析器插件以转存任意网站的文件</li><li>存储端支持:<ul><li>Alist</li><li>S3</li><li>WebDAV</li><li>本地磁盘</li><li>Telegram (重传回指定聊天)</li></ul></li></ul><h2 id=贡献者><a href=https://github.com/krau/SaveAny-Bot/graphs/contributors>贡献者</a>
<a class=anchor href=#%e8%b4%a1%e7%8c%ae%e8%80%85>#</a></h2><p><img src="https://contrib.rocks/image?repo=krau/SaveAny-Bot&amp;max=750&amp;columns=20" alt=Contributors></p></article><footer class=book-footer><div class="flex flex-wrap justify-between"><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/commit/91814a83c76b67ea1abb4e66b12537374f56c556 title='最后修改者 krau | 2025/12/04' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
<span>2025/12/04</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/zh/_index.md target=_blank rel=noopener><img src=/svg/edit.svg class=book-icon alt>
<a class=anchor href=#-%e7%89%b9%e6%80%a7>#</a></h2><ul><li>支持文档/视频/图片/贴纸…甚至还有 <a href=https://telegra.ph/>Telegraph</a></li><li>破解禁止保存的文件</li><li>批量下载</li><li>流式传输</li><li>多用户使用</li><li>基于存储规则的自动整理</li><li>监听并自动转存指定聊天的消息, 支持过滤</li><li>在不同存储端之间转存文件</li><li>集成 yt-dlp, 从所支持的网站下载并转存媒体文件</li><li>集成 Aria2, 支持直链/磁力下载和转存</li><li>使用 js 编写解析器插件以转存任意网站的文件</li><li>存储端支持:<ul><li>Alist</li><li>S3</li><li>WebDAV</li><li>本地磁盘</li><li>Telegram (重传回指定聊天)</li></ul></li></ul><h2 id=贡献者><a href=https://github.com/krau/SaveAny-Bot/graphs/contributors>贡献者</a>
<a class=anchor href=#%e8%b4%a1%e7%8c%ae%e8%80%85>#</a></h2><p><img src="https://contrib.rocks/image?repo=krau/SaveAny-Bot&amp;max=750&amp;columns=20" alt=Contributors></p></article><footer class=book-footer><div class="flex flex-wrap justify-between"><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/commit/33a886fac9ff1d63ee44bb246eaad8bb3441035f title='最后修改者 krau | 2026/01/19' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
<span>2026/01/19</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/zh/_index.md target=_blank rel=noopener><img src=/svg/edit.svg class=book-icon alt>
<span>编辑本页</span></a></div></div><script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script></footer><div class=book-comments></div><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav id=TableOfContents><ul><li><a href=#-特性>🎯 特性</a></li><li><a href=#贡献者><a href=https://github.com/krau/SaveAny-Bot/graphs/contributors>贡献者</a></a></li></ul></nav></div></aside></main></body></html>

View File

@@ -1 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://sabot.unv.app/zh/sitemap.xml</loc><lastmod>2026-01-06T09:35:21+08:00</lastmod></sitemap><sitemap><loc>https://sabot.unv.app/en/sitemap.xml</loc><lastmod>2026-01-06T09:35:21+08:00</lastmod></sitemap></sitemapindex>
<?xml version="1.0" encoding="utf-8" standalone="yes"?><sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://sabot.unv.app/zh/sitemap.xml</loc><lastmod>2026-01-19T21:55:26+08:00</lastmod></sitemap><sitemap><loc>https://sabot.unv.app/en/sitemap.xml</loc><lastmod>2026-01-19T21:55:26+08:00</lastmod></sitemap></sitemapindex>

View File

@@ -45,7 +45,7 @@ IS-ALBUM
FILENAME-REGEX MESSAGE-REGEX IS-ALBUM 添加规则的基本语法:"><meta property="og:locale" content="zh"><meta property="og:type" content="website"><title>使用帮助 | Save Any Bot</title><link rel=icon href=/favicon.png><link rel=manifest href=/manifest.json><link rel=canonical href=https://sabot.unv.app/usage/><link rel=alternate hreflang=en href=https://sabot.unv.app/en/usage/ title=Usage><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous><link rel=alternate type=application/rss+xml href=https://sabot.unv.app/usage/index.xml title="Save Any Bot"></head><body dir=ltr><input type=checkbox class="hidden toggle" id=menu-control>
<input type=checkbox class="hidden toggle" id=toc-control><main class="container flex"><aside class=book-menu><div class=book-menu-content><nav><h2 class=book-brand><a class="flex align-center" href=/><img src=/logo.png alt=Logo class=book-icon><span>Save Any Bot</span></a></h2><ul class=book-languages><li><input type=checkbox id=languages class=toggle>
<label for=languages class=flex><a role=button class="flex flex-auto"><img src=/svg/translate.svg class=book-icon alt=Languages>
简体中文</a></label><ul><li><a href=/en/usage/>English</a></li></ul></li></ul><ul><li><a href=https://github.com/krau/SaveAny-Bot target=_blank rel=noopener>🔗 GitHub</a></li></ul><ul><li><span>部署指南</span><ul><li><a href=/deployment/installation/>安装与更新</a></li><li><a href=/deployment/configuration/>配置说明</a><ul><li><a href=/deployment/configuration/storages/>存储端配置</a></li></ul></li></ul></li><li><a href=/usage/ class=active>使用帮助</a><ul></ul></li><li><a href=/help/>常见问题</a><ul></ul></li><li><a href=/contribute/>参与开发</a><ul></ul></li></ul></nav><script>(function(){var e=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script></div></aside><div class=book-page><header class=book-header><div class="flex align-center justify-between"><label for=menu-control><img src=/svg/menu.svg class=book-icon alt=Menu></label><h3>使用帮助</h3><label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav id=TableOfContents><ul><li><a href=#转存文件>转存文件</a></li><li><a href=#静默模式-silent>静默模式 (silent)</a></li><li><a href=#存储规则>存储规则</a><ul><li><a href=#filename-regex>FILENAME-REGEX</a></li><li><a href=#message-regex>MESSAGE-REGEX</a></li><li><a href=#is-album>IS-ALBUM</a></li></ul></li><li><a href=#监听聊天>监听聊天</a><ul><li><a href=#msgre>msgre</a></li></ul></li><li><a href=#转存-telegram-之外的文件>转存 Telegram 之外的文件</a></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=使用帮助>使用帮助
简体中文</a></label><ul><li><a href=/en/usage/>English</a></li></ul></li></ul><ul><li><a href=https://github.com/krau/SaveAny-Bot target=_blank rel=noopener>🔗 GitHub</a></li></ul><ul><li><span>部署指南</span><ul><li><a href=/deployment/installation/>安装与更新</a></li><li><a href=/deployment/configuration/>配置说明</a><ul><li><a href=/deployment/configuration/storages/>存储端配置</a></li></ul></li></ul></li><li><a href=/usage/ class=active>使用帮助</a><ul></ul></li><li><a href=/help/>常见问题</a><ul></ul></li><li><a href=/contribute/>参与开发</a><ul></ul></li></ul></nav><script>(function(){var e=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script></div></aside><div class=book-page><header class=book-header><div class="flex align-center justify-between"><label for=menu-control><img src=/svg/menu.svg class=book-icon alt=Menu></label><h3>使用帮助</h3><label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav id=TableOfContents><ul><li><a href=#转存文件>转存文件</a></li><li><a href=#静默模式-silent>静默模式 (silent)</a></li><li><a href=#存储规则>存储规则</a><ul><li><a href=#filename-regex>FILENAME-REGEX</a></li><li><a href=#message-regex>MESSAGE-REGEX</a></li><li><a href=#is-album>IS-ALBUM</a></li></ul></li><li><a href=#监听聊天>监听聊天</a><ul><li><a href=#msgre>msgre</a></li></ul></li><li><a href=#直接下载链接>直接下载链接</a></li><li><a href=#aria2-下载>Aria2 下载</a></li><li><a href=#yt-dlp-视频下载>yt-dlp 视频下载</a></li><li><a href=#存储间传输>存储间传输</a></li><li><a href=#转存-telegram-之外的文件>转存 Telegram 之外的文件</a></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=使用帮助>使用帮助
<a class=anchor href=#%e4%bd%bf%e7%94%a8%e5%b8%ae%e5%8a%a9>#</a></h1><p>这里介绍 Save Any Bot 的一些功能和使用方法, 如果你没有在这里找到你需要的内容, 另请参阅 <a href=../deployment/configuration>配置说明</a> 或前往 Github <a href=https://github.com/krau/SaveAny-Bot/discussions>Discussions</a> 提问.</p><h2 id=转存文件>转存文件
<a class=anchor href=#%e8%bd%ac%e5%ad%98%e6%96%87%e4%bb%b6>#</a></h2><p>要使用 Bot 的转存 Telegram 文件功能, 需要向 Bot 发送或转发以下类型的消息.</p><ol><li>文件或媒体消息, 如图片, 视频, 文档等</li><li>Telegram 消息链接, 例如: <code>https://t.me/acherkrau/1097</code>. <strong>即使频道禁止了转发和保存, Bot 依然可以下载其文件.</strong></li><li>Telegra.ph 的文章链接, Bot 将下载其中的所有图片</li></ol><h2 id=静默模式-silent>静默模式 (silent)
<a class=anchor href=#%e9%9d%99%e9%bb%98%e6%a8%a1%e5%bc%8f-silent>#</a></h2><p>使用 <code>/silent</code> 命令可以开关静默模式.</p><p>默认情况下不开启静默模式, Bot 会询问你每个文件的保存位置.</p><p>开启静默模式后, Bot 会直接保存文件到默认位置, 无需确认.</p><p>在开启静默模式之前, 需要使用 <code>/storage</code> 命令设置默认保存位置.</p><h2 id=存储规则>存储规则
@@ -60,7 +60,50 @@ FILENAME-REGEX MESSAGE-REGEX IS-ALBUM 添加规则的基本语法:"><meta proper
</code></pre><p>取消监听:</p><pre tabindex=0><code>/unwatch &lt;chat_id/username&gt;
</code></pre><p>过滤器类型:</p><h3 id=msgre>msgre
<a class=anchor href=#msgre>#</a></h3><p>正则匹配消息文本, 例如:</p><pre tabindex=0><code>/watch 12345678 msgre:.*hello.*
</code></pre><p>这将会监听 ID 为 12345678 的聊天, 并且只保存消息文本中包含 &ldquo;hello&rdquo; 的消息.</p><h2 id=转存-telegram-之外的文件>转存 Telegram 之外的文件
<a class=anchor href=#%e8%bd%ac%e5%ad%98-telegram-%e4%b9%8b%e5%a4%96%e7%9a%84%e6%96%87%e4%bb%b6>#</a></h2><p>除了 Telegram 上的文件, Bot 还可通过 JavaScript 插件或内置解析器来支持转存其他网站的文件.</p><blockquote><p>查看<a href=../contribute>贡献解析器</a>文档了解详情</p></blockquote><p>只需向 Bot 发送符合解析器要求的链接即可使用, 当前内置的解析器:</p><ul><li>Twitter</li><li>Kemono</li></ul></article><footer class=book-footer><div class="flex flex-wrap justify-between"><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/commit/4997ec408f08993d74b67aac4869885ea8be62a7 title='最后修改者 krau | 2025/08/23' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
<span>2025/08/23</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/zh/usage/_index.md target=_blank rel=noopener><img src=/svg/edit.svg class=book-icon alt>
<span>编辑本页</span></a></div></div><script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script></footer><div class=book-comments></div><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav id=TableOfContents><ul><li><a href=#转存文件>转存文件</a></li><li><a href=#静默模式-silent>静默模式 (silent)</a></li><li><a href=#存储规则>存储规则</a><ul><li><a href=#filename-regex>FILENAME-REGEX</a></li><li><a href=#message-regex>MESSAGE-REGEX</a></li><li><a href=#is-album>IS-ALBUM</a></li></ul></li><li><a href=#监听聊天>监听聊天</a><ul><li><a href=#msgre>msgre</a></li></ul></li><li><a href=#转存-telegram-之外的文件>转存 Telegram 之外的文件</a></li></ul></nav></div></aside></main></body></html>
</code></pre><p>这将会监听 ID 为 12345678 的聊天, 并且只保存消息文本中包含 &ldquo;hello&rdquo; 的消息.</p><h2 id=直接下载链接>直接下载链接
<a class=anchor href=#%e7%9b%b4%e6%8e%a5%e4%b8%8b%e8%bd%bd%e9%93%be%e6%8e%a5>#</a></h2><p>使用 <code>/dl</code> 命令可以直接下载一个或多个 HTTP/HTTPS 链接的文件到存储中.</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>/dl &lt;url1&gt; <span style=color:#f92672>[</span>url2<span style=color:#f92672>]</span> <span style=color:#f92672>[</span>url3<span style=color:#f92672>]</span> ...
</span></span></code></pre></div><p>示例:</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>/dl https://example.com/file.zip
</span></span><span style=display:flex><span>/dl https://example.com/file1.zip https://example.com/file2.zip
</span></span></code></pre></div><p>Bot 会验证链接格式, 然后让你选择目标存储位置.</p><h2 id=aria2-下载>Aria2 下载
<a class=anchor href=#aria2-%e4%b8%8b%e8%bd%bd>#</a></h2><blockquote class="book-hint warning">该功能需要在配置文件中启用 Aria2 并配置 RPC 连接.</blockquote><p>使用 <code>/aria2dl</code> 命令可以通过 Aria2 下载管理器下载文件, 支持 HTTP/HTTPS、FTP、BitTorrent 等多种协议.</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>/aria2dl &lt;uri1&gt; <span style=color:#f92672>[</span>uri2<span style=color:#f92672>]</span> <span style=color:#f92672>[</span>uri3<span style=color:#f92672>]</span> ...
</span></span></code></pre></div><p>示例:</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#75715e># 下载 HTTP 链接</span>
</span></span><span style=display:flex><span>/aria2dl https://example.com/file.zip
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#75715e># 下载磁力链接</span>
</span></span><span style=display:flex><span>/aria2dl magnet:?xt<span style=color:#f92672>=</span>urn:btih:...
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#75715e># 下载种子文件 (需要先上传 .torrent 文件)</span>
</span></span><span style=display:flex><span>/aria2dl https://example.com/file.torrent
</span></span></code></pre></div><p>配置 Aria2:</p><p><code>config.toml</code> 中添加:</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-toml data-lang=toml><span style=display:flex><span>[<span style=color:#a6e22e>aria2</span>]
</span></span><span style=display:flex><span><span style=color:#a6e22e>enable</span> = <span style=color:#66d9ef>true</span>
</span></span><span style=display:flex><span><span style=color:#a6e22e>url</span> = <span style=color:#e6db74>&#34;http://localhost:6800/jsonrpc&#34;</span>
</span></span><span style=display:flex><span><span style=color:#a6e22e>secret</span> = <span style=color:#e6db74>&#34;your-rpc-secret&#34;</span> <span style=color:#75715e># 如果配置了 rpc-secret</span>
</span></span><span style=display:flex><span><span style=color:#a6e22e>remove_after_transfer</span> = <span style=color:#66d9ef>true</span> <span style=color:#75715e># 转存完成后删除本地文件</span>
</span></span></code></pre></div><h2 id=yt-dlp-视频下载>yt-dlp 视频下载
<a class=anchor href=#yt-dlp-%e8%a7%86%e9%a2%91%e4%b8%8b%e8%bd%bd>#</a></h2><blockquote class="book-hint warning">该功能需要在系统中安装 yt-dlp 命令行工具.</blockquote><p>使用 <code>/ytdlp</code> 命令可以下载支持的视频网站的视频和音频, 支持 YouTube、Bilibili、Twitter 等 1000+ 个网站.</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>/ytdlp &lt;url1&gt; <span style=color:#f92672>[</span>url2<span style=color:#f92672>]</span> <span style=color:#f92672>[</span>flags...<span style=color:#f92672>]</span>
</span></span></code></pre></div><p>示例:</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#75715e># 基本下载</span>
</span></span><span style=display:flex><span>/ytdlp https://www.youtube.com/watch?v<span style=color:#f92672>=</span>dQw4w9WgXcQ
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#75715e># 下载多个视频</span>
</span></span><span style=display:flex><span>/ytdlp https://www.youtube.com/watch?v<span style=color:#f92672>=</span>video1 https://www.youtube.com/watch?v<span style=color:#f92672>=</span>video2
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#75715e># 使用自定义参数</span>
</span></span><span style=display:flex><span>/ytdlp https://www.youtube.com/watch?v<span style=color:#f92672>=</span>dQw4w9WgXcQ -f best
</span></span><span style=display:flex><span>/ytdlp https://www.youtube.com/watch?v<span style=color:#f92672>=</span>dQw4w9WgXcQ --extract-audio --audio-format mp3
</span></span></code></pre></div><p>常用参数:</p><ul><li><code>-f &lt;format></code>: 指定下载格式 (如 <code>best</code>, <code>worst</code>, <code>bestvideo+bestaudio</code>)</li><li><code>--extract-audio</code>: 提取音频</li><li><code>--audio-format &lt;format></code>: 音频格式 (如 <code>mp3</code>, <code>m4a</code>, <code>wav</code>)</li><li><code>--write-sub</code>: 下载字幕</li><li><code>--write-thumbnail</code>: 下载缩略图</li></ul><p>更多参数请参考 <a href=https://github.com/yt-dlp/yt-dlp#usage-and-options>yt-dlp 文档</a>.</p><h2 id=存储间传输>存储间传输
<a class=anchor href=#%e5%ad%98%e5%82%a8%e9%97%b4%e4%bc%a0%e8%be%93>#</a></h2><p>使用 <code>/transfer</code> 命令可以在不同存储之间直接传输文件, 无需经过 Telegram.</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>/transfer &lt;source_storage&gt;:/&lt;source_path&gt; <span style=color:#f92672>[</span>filter<span style=color:#f92672>]</span>
</span></span></code></pre></div><p>参数说明:</p><ul><li><code>source_storage</code>: 源存储名称</li><li><code>source_path</code>: 源路径</li><li><code>filter</code>: 可选的正则表达式过滤器, 只传输匹配的文件</li></ul><p>示例:</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#75715e># 传输整个目录</span>
</span></span><span style=display:flex><span>/transfer local1:/downloads
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#75715e># 传输指定路径的文件</span>
</span></span><span style=display:flex><span>/transfer alist1:/media/photos
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#75715e># 只传输 mp4 文件</span>
</span></span><span style=display:flex><span>/transfer webdav1:/videos <span style=color:#e6db74>&#34;.*\.mp4</span>$<span style=color:#e6db74>&#34;</span>
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#75715e># 传输图片文件</span>
</span></span><span style=display:flex><span>/transfer local1:/pictures <span style=color:#e6db74>&#34;(?i)\.(jpg|png|gif)</span>$<span style=color:#e6db74>&#34;</span>
</span></span></code></pre></div><p>Bot 会:</p><ol><li>列出源路径下的所有文件</li><li>应用过滤器 (如果提供)</li><li>显示文件数量和总大小</li><li>让你选择目标存储</li><li>让你选择目标目录 (如果该存储配置了目录)</li><li>开始传输任务</li></ol><p>注意:</p><ul><li>源存储必须支持列举和读取功能</li><li>目标存储必须支持写入功能</li><li>传输过程显示实时进度</li><li>支持取消正在进行的传输任务</li></ul><h2 id=转存-telegram-之外的文件>转存 Telegram 之外的文件
<a class=anchor href=#%e8%bd%ac%e5%ad%98-telegram-%e4%b9%8b%e5%a4%96%e7%9a%84%e6%96%87%e4%bb%b6>#</a></h2><p>除了 Telegram 上的文件, Bot 还可通过 JavaScript 插件或内置解析器来支持转存其他网站的文件.</p><blockquote><p>查看<a href=../contribute>贡献解析器</a>文档了解详情</p></blockquote><p>只需向 Bot 发送符合解析器要求的链接即可使用, 当前内置的解析器:</p><ul><li>Twitter</li><li>Kemono</li></ul></article><footer class=book-footer><div class="flex flex-wrap justify-between"><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/commit/33a886fac9ff1d63ee44bb246eaad8bb3441035f title='最后修改者 krau | 2026/01/19' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
<span>2026/01/19</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/zh/usage/_index.md target=_blank rel=noopener><img src=/svg/edit.svg class=book-icon alt>
<span>编辑本页</span></a></div></div><script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script></footer><div class=book-comments></div><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav id=TableOfContents><ul><li><a href=#转存文件>转存文件</a></li><li><a href=#静默模式-silent>静默模式 (silent)</a></li><li><a href=#存储规则>存储规则</a><ul><li><a href=#filename-regex>FILENAME-REGEX</a></li><li><a href=#message-regex>MESSAGE-REGEX</a></li><li><a href=#is-album>IS-ALBUM</a></li></ul></li><li><a href=#监听聊天>监听聊天</a><ul><li><a href=#msgre>msgre</a></li></ul></li><li><a href=#直接下载链接>直接下载链接</a></li><li><a href=#aria2-下载>Aria2 下载</a></li><li><a href=#yt-dlp-视频下载>yt-dlp 视频下载</a></li><li><a href=#存储间传输>存储间传输</a></li><li><a href=#转存-telegram-之外的文件>转存 Telegram 之外的文件</a></li></ul></nav></div></aside></main></body></html>

View File

@@ -1 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>https://sabot.unv.app/deployment/</loc><lastmod>2025-06-16T15:58:03+08:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/"/><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/"/></url><url><loc>https://sabot.unv.app/usage/</loc><lastmod>2025-08-23T20:42:51+08:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/usage/"/><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/usage/"/></url><url><loc>https://sabot.unv.app/help/</loc><lastmod>2025-06-16T15:58:03+08:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/help/"/><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/help/"/></url><url><loc>https://sabot.unv.app/contribute/</loc><lastmod>2025-12-19T11:45:52+08:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/contribute/"/><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/contribute/"/></url><url><loc>https://sabot.unv.app/categories/</loc><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/categories/"/><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/categories/"/></url><url><loc>https://sabot.unv.app/tags/</loc><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/tags/"/><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/tags/"/></url><url><loc>https://sabot.unv.app/deployment/installation/</loc><lastmod>2025-12-18T18:43:57+08:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/installation/"/><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/installation/"/></url><url><loc>https://sabot.unv.app/deployment/configuration/storages/</loc><lastmod>2025-12-19T10:44:38+08:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/configuration/storages/"/><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/configuration/storages/"/></url><url><loc>https://sabot.unv.app/</loc><lastmod>2025-12-04T22:59:23+08:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/"/><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/"/></url><url><loc>https://sabot.unv.app/deployment/configuration/</loc><lastmod>2026-01-06T09:35:21+08:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/configuration/"/><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/configuration/"/></url></urlset>
<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>https://sabot.unv.app/deployment/</loc><lastmod>2025-06-16T15:58:03+08:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/"/><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/"/></url><url><loc>https://sabot.unv.app/usage/</loc><lastmod>2026-01-19T21:55:26+08:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/usage/"/><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/usage/"/></url><url><loc>https://sabot.unv.app/help/</loc><lastmod>2025-06-16T15:58:03+08:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/help/"/><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/help/"/></url><url><loc>https://sabot.unv.app/contribute/</loc><lastmod>2025-12-19T11:45:52+08:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/contribute/"/><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/contribute/"/></url><url><loc>https://sabot.unv.app/categories/</loc><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/categories/"/><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/categories/"/></url><url><loc>https://sabot.unv.app/tags/</loc><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/tags/"/><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/tags/"/></url><url><loc>https://sabot.unv.app/deployment/installation/</loc><lastmod>2025-12-18T18:43:57+08:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/installation/"/><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/installation/"/></url><url><loc>https://sabot.unv.app/deployment/configuration/storages/</loc><lastmod>2025-12-19T10:44:38+08:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/configuration/storages/"/><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/configuration/storages/"/></url><url><loc>https://sabot.unv.app/</loc><lastmod>2026-01-19T21:55:26+08:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/"/><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/"/></url><url><loc>https://sabot.unv.app/deployment/configuration/</loc><lastmod>2026-01-19T21:55:26+08:00</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/configuration/"/><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/configuration/"/></url></urlset>