mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-05-11 17:29:40 +08:00
deploy: 38355dfd14
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<!doctype html><html lang=en dir=ltr><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content><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/categories/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="Categories"><meta property="og:locale" content="en"><meta property="og:type" content="website"><title>Categories | 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/categories/><link rel=alternate hreflang=zh href=https://sabot.unv.app/categories/ title=Categories><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/categories/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=/categories/>简体中文</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>Categories</h3><label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav><ul><li class=book-section-flat><span>Categories</span><ul></ul></li><li class=book-section-flat><span>Tags</span><ul></ul></li></ul></nav></aside></header><article class="markdown book-post"><h1>Categories</h1></article><footer class=book-footer><div class="flex flex-wrap justify-between"></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><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav><ul><li class=book-section-flat><span>Categories</span><ul></ul></li><li class=book-section-flat><span>Tags</span><ul></ul></li></ul></nav></div></aside></main></body></html>
|
||||
English</a></label><ul><li><a href=/categories/>简体中文</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><li><a href=/en/usage/silent/>Silent Mode</a></li><li><a href=/en/usage/rules/>Storage Rules</a></li><li><a href=/en/usage/watch/>Watch Chats</a></li><li><a href=/en/usage/directlinks/>Direct Download Links</a></li><li><a href=/en/usage/aria2/>Aria2 Download</a></li><li><a href=/en/usage/ytdlp/>yt-dlp Video Download</a></li><li><a href=/en/usage/transfer/>Storage Transfer</a></li><li><a href=/en/usage/parsers/>Save Files Outside Telegram</a></li><li><a href=/en/usage/api/>HTTP API</a></li></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>Categories</h3><label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav><ul><li class=book-section-flat><span>Categories</span><ul></ul></li><li class=book-section-flat><span>Tags</span><ul></ul></li></ul></nav></aside></header><article class="markdown book-post"><h1>Categories</h1></article><footer class=book-footer><div class="flex flex-wrap justify-between"></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><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav><ul><li class=book-section-flat><span>Categories</span><ul></ul></li><li class=book-section-flat><span>Tags</span><ul></ul></li></ul></nav></div></aside></main></body></html>
|
||||
@@ -28,7 +28,7 @@ Here are some guidelines and suggestions for contributing code. You don’t have
|
||||
Open an issue before adding new features, so we can discuss design and implementation details and avoid work that doesn’t fit the project design. Use modern development tools, format your code before committing, and keep the style consistent. Use Conventional Commits, and avoid vague or overly simple commit messages. Contributing New Storage Backend # Add the new storage backend type in pkg/enums/storage/storages.go and run code generation. Define the storage backend configuration in the config/storage directory and add it to config/storage/factory.go. Create a new package in the storage directory, implement the storage backend, and import it in storage/storage.go. Update the documentation to include configuration details for the new storage backend. Contributing New Parsers # You can either implement native parsers in Go (recommended), or write JavaScript-based parser plugins."><meta property="og:locale" content="en"><meta property="og:type" content="website"><title>Contributing | 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/contribute/><link rel=alternate hreflang=zh href=https://sabot.unv.app/contribute/ 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/contribute/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=/contribute/>简体中文</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/ class=active>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>Contributing</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=#contributing-new-storage-backend>Contributing New Storage Backend</a></li><li><a href=#contributing-new-parsers>Contributing New Parsers</a></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=contributing>Contributing
|
||||
English</a></label><ul><li><a href=/contribute/>简体中文</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><li><a href=/en/usage/silent/>Silent Mode</a></li><li><a href=/en/usage/rules/>Storage Rules</a></li><li><a href=/en/usage/watch/>Watch Chats</a></li><li><a href=/en/usage/directlinks/>Direct Download Links</a></li><li><a href=/en/usage/aria2/>Aria2 Download</a></li><li><a href=/en/usage/ytdlp/>yt-dlp Video Download</a></li><li><a href=/en/usage/transfer/>Storage Transfer</a></li><li><a href=/en/usage/parsers/>Save Files Outside Telegram</a></li><li><a href=/en/usage/api/>HTTP API</a></li></ul></li><li><a href=/en/help/>Frequently Asked Questions</a><ul></ul></li><li><a href=/en/contribute/ class=active>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>Contributing</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=#contributing-new-storage-backend>Contributing New Storage Backend</a></li><li><a href=#contributing-new-parsers>Contributing New Parsers</a></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=contributing>Contributing
|
||||
<a class=anchor href=#contributing>#</a></h1><p>Before you start, please fork this repository, clone it locally, and set up your Go development environment.</p><p>Here are some guidelines and suggestions for contributing code. You don’t have to strictly follow them, but they help speed up review and merging:</p><ul><li><strong>Open an issue before adding new features</strong>, so we can discuss design and implementation details and avoid work that doesn’t fit the project design.</li><li><strong>Use modern development tools</strong>, format your code before committing, and keep the style consistent.</li><li><strong>Use <a href=https://www.conventionalcommits.org/en/v1.0.0/>Conventional Commits</a></strong>, and avoid vague or overly simple commit messages.</li></ul><h2 id=contributing-new-storage-backend>Contributing New Storage Backend
|
||||
<a class=anchor href=#contributing-new-storage-backend>#</a></h2><ol><li>Add the new storage backend type in <code>pkg/enums/storage/storages.go</code> and run code generation.</li><li>Define the storage backend configuration in the <code>config/storage</code> directory and add it to <code>config/storage/factory.go</code>.</li><li>Create a new package in the <code>storage</code> directory, implement the storage backend, and import it in <code>storage/storage.go</code>.</li><li>Update the documentation to include configuration details for the new storage backend.</li></ol><h2 id=contributing-new-parsers>Contributing New Parsers
|
||||
<a class=anchor href=#contributing-new-parsers>#</a></h2><p>You can either implement native parsers in Go (recommended), or write JavaScript-based parser plugins.</p><p>If you use Go:</p><ol><li>Create a new package under the <code>parsers</code> directory and implement the parser logic.</li><li>Register the parser in the <code>init</code> function in <code>parsers/parser.go</code>.</li></ol><p>If you use JavaScript:</p><ol><li>Refer to <code>plugins/example_parser_basic.js</code> as an example.</li><li>Create a new <code>.js</code> file in the <code>plugins</code> directory and implement your parsing logic there.</li></ol><p>Note: Parsers under the <code>plugins</code> directory are not embedded into the binary by default. Users must download them manually and place them in the configured plugin directories to enable them.</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>
|
||||
|
||||
@@ -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=#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
|
||||
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><li><a href=/en/usage/silent/>Silent Mode</a></li><li><a href=/en/usage/rules/>Storage Rules</a></li><li><a href=/en/usage/watch/>Watch Chats</a></li><li><a href=/en/usage/directlinks/>Direct Download Links</a></li><li><a href=/en/usage/aria2/>Aria2 Download</a></li><li><a href=/en/usage/ytdlp/>yt-dlp Video Download</a></li><li><a href=/en/usage/transfer/>Storage Transfer</a></li><li><a href=/en/usage/parsers/>Save Files Outside Telegram</a></li><li><a href=/en/usage/api/>HTTP API</a></li></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>"1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZ"</span>
|
||||
</span></span><span style=display:flex><span>
|
||||
|
||||
@@ -27,7 +27,7 @@ Stream mode is not supported.
|
||||
url = "https://alist.example.com" # URL of Alist username = "your_username" # Username for Alist password = "your_password" # Password for Alist base_path = "/path/saveanybot" # Base path in Alist, all files will be stored under this path token_exp = 3600 # Auto-refresh time for Alist access token, in seconds token = "your_token" # Access token for Alist, optional, if not set, username and password will be used for authentication. # When using token authentication, the token cannot be automatically refreshed Local Disk # type=local'><meta property="og:locale" content="en"><meta property="og:type" content="article"><meta property="article:section" content="deployment"><meta property="article:modified_time" content="2026-01-30T13:34:29+08:00"><title>Storage Configuration | 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/storages/><link rel=alternate hreflang=zh href=https://sabot.unv.app/deployment/configuration/storages/ title=存储端配置><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous></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/storages/>简体中文</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/ class=active>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>Storage Configuration</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=#alist>Alist</a></li><li><a href=#local-disk>Local Disk</a></li><li><a href=#webdav>WebDAV</a></li><li><a href=#s3>S3</a></li><li><a href=#telegram>Telegram</a></li><li><a href=#rclone>Rclone</a><ul><li><a href=#configuring-rclone-remote>Configuring rclone Remote</a></li><li><a href=#usage-examples>Usage Examples</a></li></ul></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=storage-configuration>Storage Configuration
|
||||
English</a></label><ul><li><a href=/deployment/configuration/storages/>简体中文</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/ class=active>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><li><a href=/en/usage/silent/>Silent Mode</a></li><li><a href=/en/usage/rules/>Storage Rules</a></li><li><a href=/en/usage/watch/>Watch Chats</a></li><li><a href=/en/usage/directlinks/>Direct Download Links</a></li><li><a href=/en/usage/aria2/>Aria2 Download</a></li><li><a href=/en/usage/ytdlp/>yt-dlp Video Download</a></li><li><a href=/en/usage/transfer/>Storage Transfer</a></li><li><a href=/en/usage/parsers/>Save Files Outside Telegram</a></li><li><a href=/en/usage/api/>HTTP API</a></li></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>Storage Configuration</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=#alist>Alist</a></li><li><a href=#local-disk>Local Disk</a></li><li><a href=#webdav>WebDAV</a></li><li><a href=#s3>S3</a></li><li><a href=#telegram>Telegram</a></li><li><a href=#rclone>Rclone</a><ul><li><a href=#configuring-rclone-remote>Configuring rclone Remote</a></li><li><a href=#usage-examples>Usage Examples</a></li></ul></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=storage-configuration>Storage Configuration
|
||||
<a class=anchor href=#storage-configuration>#</a></h1><p>Please first read the <a href=../>Configuration Guide</a> to understand the basic format of the configuration file.</p><h2 id=alist>Alist
|
||||
<a class=anchor href=#alist>#</a></h2><p><code>type=alist</code></p><p>Stream mode is not supported.</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>url</span> = <span style=color:#e6db74>"https://alist.example.com"</span> <span style=color:#75715e># URL of Alist</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>username</span> = <span style=color:#e6db74>"your_username"</span> <span style=color:#75715e># Username for Alist</span>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!doctype html><html lang=en dir=ltr><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content><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/deployment/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="Deployment Guide"><meta property="og:locale" content="en"><meta property="og:type" content="website"><title>Deployment 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/><link rel=alternate hreflang=zh href=https://sabot.unv.app/deployment/ 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/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/>简体中文</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>Deployment 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></nav></aside></header><article class="markdown book-article"></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/73b5f1b18e505b93277abbf3a78f889ce1034fc4 title='Last modified by krau | 2025/06/16' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
|
||||
English</a></label><ul><li><a href=/deployment/>简体中文</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><li><a href=/en/usage/silent/>Silent Mode</a></li><li><a href=/en/usage/rules/>Storage Rules</a></li><li><a href=/en/usage/watch/>Watch Chats</a></li><li><a href=/en/usage/directlinks/>Direct Download Links</a></li><li><a href=/en/usage/aria2/>Aria2 Download</a></li><li><a href=/en/usage/ytdlp/>yt-dlp Video Download</a></li><li><a href=/en/usage/transfer/>Storage Transfer</a></li><li><a href=/en/usage/parsers/>Save Files Outside Telegram</a></li><li><a href=/en/usage/api/>HTTP API</a></li></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>Deployment 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></nav></aside></header><article class="markdown book-article"></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/73b5f1b18e505b93277abbf3a78f889ce1034fc4 title='Last modified by krau | 2025/06/16' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
|
||||
<span>2025/06/16</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/deployment/_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><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav id=TableOfContents></nav></div></aside></main></body></html>
|
||||
@@ -114,7 +114,7 @@ Run:
|
||||
chmod +x saveany-bot ./saveany-bot Daemon # systemd (Regular Linux) Create a file /etc/systemd/system/saveany-bot.service and write the following content: [Unit] Description=SaveAnyBot After=systemd-user-sessions.service [Service] Type=simple WorkingDirectory=/yourpath/ ExecStart=/yourpath/saveany-bot Restart=always [Install] WantedBy=multi-user.target Enable startup on boot and start the service: systemctl enable --now saveany-bot procd (OpenWrt) Add Boot Autostart Service Create a file /etc/init.d/saveanybot, refer to wrt_init and modify as needed: #!/bin/sh /etc/rc.common #This is the OpenWRT init.d script for SaveAnyBot START=99 STOP=10 description=&#34;SaveAnyBot&#34; WORKING_DIR=&#34;/mnt/mmc1-1/SaveAnyBot&#34; EXEC_PATH=&#34;$WORKING_DIR/saveany-bot&#34; start() { echo &#34;Starting SaveAnyBot...&#34; cd $WORKING_DIR $EXEC_PATH &amp; } stop() { echo &#34;Stopping SaveAnyBot...&#34; killall saveany-bot } reload() { stop start } Set permissions: chmod +x /etc/init.d/saveanybot Then copy the file to /etc/rc.d and rename it to S99saveanybot, also set permissions: chmod +x /etc/rc.d/S99saveanybot Add Shortcut Commands Create a file /usr/bin/sabot, refer to wrt_bin and modify as needed. Note that the file encoding here only supports ANSI 936. Then set permissions: chmod +x /usr/bin/sabot Usage: sudo sabot start|stop|restart|status|enable|disable Deploy Using Docker # Docker Compose # Download the docker-compose.yml file, create a new config.toml file in the same directory, refer to config.example.toml to edit the configuration file."><meta property="og:locale" content="en"><meta property="og:type" content="article"><meta property="article:section" content="deployment"><meta property="article:modified_time" content="2026-01-05T11:56:19+08:00"><title>Installation and Updates | 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/installation/><link rel=alternate hreflang=zh href=https://sabot.unv.app/deployment/installation/ title=安装与更新><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous></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/installation/>简体中文</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/ class=active>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>Installation and Updates</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=#deploy-from-pre-compiled-binary-recommended>Deploy from Pre-compiled Binary (Recommended)</a><ul><li><a href=#daemon>Daemon</a></li></ul></li><li><a href=#deploy-using-docker>Deploy Using Docker</a><ul><li><a href=#docker-compose>Docker Compose</a></li><li><a href=#docker>Docker</a></li></ul></li><li><a href=#updates>Updates</a></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=installation-and-updates>Installation and Updates
|
||||
English</a></label><ul><li><a href=/deployment/installation/>简体中文</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/ class=active>Installation and Updates</a></li></ul></li><li><a href=/en/usage/>Usage</a><ul><li><a href=/en/usage/silent/>Silent Mode</a></li><li><a href=/en/usage/rules/>Storage Rules</a></li><li><a href=/en/usage/watch/>Watch Chats</a></li><li><a href=/en/usage/directlinks/>Direct Download Links</a></li><li><a href=/en/usage/aria2/>Aria2 Download</a></li><li><a href=/en/usage/ytdlp/>yt-dlp Video Download</a></li><li><a href=/en/usage/transfer/>Storage Transfer</a></li><li><a href=/en/usage/parsers/>Save Files Outside Telegram</a></li><li><a href=/en/usage/api/>HTTP API</a></li></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>Installation and Updates</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=#deploy-from-pre-compiled-binary-recommended>Deploy from Pre-compiled Binary (Recommended)</a><ul><li><a href=#daemon>Daemon</a></li></ul></li><li><a href=#deploy-using-docker>Deploy Using Docker</a><ul><li><a href=#docker-compose>Docker Compose</a></li><li><a href=#docker>Docker</a></li></ul></li><li><a href=#updates>Updates</a></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=installation-and-updates>Installation and Updates
|
||||
<a class=anchor href=#installation-and-updates>#</a></h1><h2 id=deploy-from-pre-compiled-binary-recommended>Deploy from Pre-compiled Binary (Recommended)
|
||||
<a class=anchor href=#deploy-from-pre-compiled-binary-recommended>#</a></h2><p>Download the binary file for your platform from the <a href=https://github.com/krau/SaveAny-Bot/releases>Release</a> page.</p><p>Create a <code>config.toml</code> file in the extracted directory, refer to the <a href=../configuration>Configuration Guide</a> to edit the configuration file.</p><p>Run:</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>chmod +x saveany-bot
|
||||
</span></span><span style=display:flex><span>./saveany-bot
|
||||
|
||||
@@ -21,7 +21,7 @@ Bot indicates successful download but files don’t show up in AList # AList cac
|
||||
Docker deployment still can’t connect to Telegram despite proxy configuration (client initialization timeout) # Docker cannot directly access the host network. If you’re not familiar with its usage, please set the container to host mode."><meta property="og:locale" content="en"><meta property="og:type" content="website"><title>Frequently Asked Questions | 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/help/><link rel=alternate hreflang=zh href=https://sabot.unv.app/help/ 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/help/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=/help/>简体中文</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/ class=active>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>Frequently Asked Questions</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=#upload-to-alist-shows-success-but-actually-fails>Upload to AList shows success but actually fails</a></li><li><a href=#bot-indicates-successful-download-but-files-dont-show-up-in-alist>Bot indicates successful download but files don’t show up in AList</a></li><li><a href=#docker-deployment-still-cant-connect-to-telegram-despite-proxy-configuration-client-initialization-timeout>Docker deployment still can’t connect to Telegram despite proxy configuration (client initialization timeout)</a></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=frequently-asked-questions>Frequently Asked Questions
|
||||
English</a></label><ul><li><a href=/help/>简体中文</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><li><a href=/en/usage/silent/>Silent Mode</a></li><li><a href=/en/usage/rules/>Storage Rules</a></li><li><a href=/en/usage/watch/>Watch Chats</a></li><li><a href=/en/usage/directlinks/>Direct Download Links</a></li><li><a href=/en/usage/aria2/>Aria2 Download</a></li><li><a href=/en/usage/ytdlp/>yt-dlp Video Download</a></li><li><a href=/en/usage/transfer/>Storage Transfer</a></li><li><a href=/en/usage/parsers/>Save Files Outside Telegram</a></li><li><a href=/en/usage/api/>HTTP API</a></li></ul></li><li><a href=/en/help/ class=active>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>Frequently Asked Questions</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=#upload-to-alist-shows-success-but-actually-fails>Upload to AList shows success but actually fails</a></li><li><a href=#bot-indicates-successful-download-but-files-dont-show-up-in-alist>Bot indicates successful download but files don’t show up in AList</a></li><li><a href=#docker-deployment-still-cant-connect-to-telegram-despite-proxy-configuration-client-initialization-timeout>Docker deployment still can’t connect to Telegram despite proxy configuration (client initialization timeout)</a></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=frequently-asked-questions>Frequently Asked Questions
|
||||
<a class=anchor href=#frequently-asked-questions>#</a></h1><h2 id=upload-to-alist-shows-success-but-actually-fails>Upload to AList shows success but actually fails
|
||||
<a class=anchor href=#upload-to-alist-shows-success-but-actually-fails>#</a></h2><p>Adjust the upload chunk size in the AList management page, and deploy AList in a more stable network environment to reduce the occurrence of this issue.</p><h2 id=bot-indicates-successful-download-but-files-dont-show-up-in-alist>Bot indicates successful download but files don’t show up in AList
|
||||
<a class=anchor href=#bot-indicates-successful-download-but-files-dont-show-up-in-alist>#</a></h2><p>AList caches directory structures. Refer to the <a href=https://alist.nn.ci/guide/drivers/common.html#cache-expiration target=_blank>documentation</a> to adjust cache expiration time.</p><h2 id=docker-deployment-still-cant-connect-to-telegram-despite-proxy-configuration-client-initialization-timeout>Docker deployment still can’t connect to Telegram despite proxy configuration (client initialization timeout)
|
||||
|
||||
@@ -41,7 +41,7 @@ Telegram (re-upload to specified chat)
|
||||
🎯 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
|
||||
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><li><a href=/en/usage/silent/>Silent Mode</a></li><li><a href=/en/usage/rules/>Storage Rules</a></li><li><a href=/en/usage/watch/>Watch Chats</a></li><li><a href=/en/usage/directlinks/>Direct Download Links</a></li><li><a href=/en/usage/aria2/>Aria2 Download</a></li><li><a href=/en/usage/ytdlp/>yt-dlp Video Download</a></li><li><a href=/en/usage/transfer/>Storage Transfer</a></li><li><a href=/en/usage/parsers/>Save Files Outside Telegram</a></li><li><a href=/en/usage/api/>HTTP API</a></li></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
|
||||
<a class=anchor href=#save-any-bot>#</a></h1><p><img src="https://img.shields.io/github/go-mod/go-version/krau/SaveAny-Bot?style=flat-square" alt>
|
||||
<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&style=flat-square" alt>
|
||||
|
||||
149
en/index.xml
149
en/index.xml
@@ -1,4 +1,151 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Introduction on Save Any Bot</title><link>https://sabot.unv.app/en/</link><description>Recent content in Introduction on Save Any Bot</description><generator>Hugo</generator><language>en</language><atom:link href="https://sabot.unv.app/en/index.xml" rel="self" type="application/rss+xml"/><item><title>Installation and Updates</title><link>https://sabot.unv.app/en/deployment/installation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/deployment/installation/</guid><description><h1 id="installation-and-updates">
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Introduction on Save Any Bot</title><link>https://sabot.unv.app/en/</link><description>Recent content in Introduction on Save Any Bot</description><generator>Hugo</generator><language>en</language><atom:link href="https://sabot.unv.app/en/index.xml" rel="self" type="application/rss+xml"/><item><title>Silent Mode</title><link>https://sabot.unv.app/en/usage/silent/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/silent/</guid><description><h1 id="silent-mode-silent">
|
||||
Silent Mode (silent)
|
||||
<a class="anchor" href="#silent-mode-silent">#</a>
|
||||
</h1>
|
||||
<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></description></item><item><title>Storage Rules</title><link>https://sabot.unv.app/en/usage/rules/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/rules/</guid><description><h1 id="storage-rules">
|
||||
Storage Rules
|
||||
<a class="anchor" href="#storage-rules">#</a>
|
||||
</h1>
|
||||
<p>Storage rules allow you to define redirection rules when the bot uploads files to storage, so that saved files are automatically organized.</p>
|
||||
<p>See: <a href="https://github.com/krau/SaveAny-Bot/issues/28" target="_blank">#28</a></p>
|
||||
<p>Currently supported rule types:</p>
|
||||
<ol>
|
||||
<li>FILENAME-REGEX</li>
|
||||
<li>MESSAGE-REGEX</li>
|
||||
<li>IS-ALBUM</li>
|
||||
</ol>
|
||||
<p>Basic syntax for adding rules:</p>
|
||||
<p>&ldquo;RuleType RuleContent StorageName Path&rdquo;</p>
|
||||
<p>Pay attention to spaces; the bot can only parse correctly formatted syntax. Below is an example of a valid rule command:</p>
|
||||
<pre tabindex="0"><code>/rule add FILENAME-REGEX (?i)\.(mp4|mkv|ts|avi|flv)$ MyAlist /videos
|
||||
</code></pre><p>In addition, if <code>CHOSEN</code> is used as the storage name in the rule, it means files will be stored under the path of the storage you selected by clicking the inline button.</p></description></item><item><title>Watch Chats</title><link>https://sabot.unv.app/en/usage/watch/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/watch/</guid><description><h1 id="watch-chats">
|
||||
Watch Chats
|
||||
<a class="anchor" href="#watch-chats">#</a>
|
||||
</h1>
|
||||
<blockquote class="book-hint warning">
|
||||
|
||||
This feature requires enabling UserBot integration.
|
||||
|
||||
</blockquote>
|
||||
|
||||
<p>You can watch messages in a specific chat and automatically save them to the default storage, following storage rules. You can also add filters so that only matching messages are saved.</p>
|
||||
<p>Watch a chat:</p>
|
||||
<pre tabindex="0"><code>/watch &lt;chat_id/username&gt; [filter]
|
||||
</code></pre><p>Stop watching:</p>
|
||||
<pre tabindex="0"><code>/unwatch &lt;chat_id/username&gt;
|
||||
</code></pre><p>Filter types:</p>
|
||||
<h2 id="msgre">
|
||||
msgre
|
||||
<a class="anchor" href="#msgre">#</a>
|
||||
</h2>
|
||||
<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></description></item><item><title>Direct Download Links</title><link>https://sabot.unv.app/en/usage/directlinks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/directlinks/</guid><description><h1 id="direct-download-links">
|
||||
Direct Download Links
|
||||
<a class="anchor" href="#direct-download-links">#</a>
|
||||
</h1>
|
||||
<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></description></item><item><title>Aria2 Download</title><link>https://sabot.unv.app/en/usage/aria2/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/aria2/</guid><description><h1 id="aria2-download">
|
||||
Aria2 Download
|
||||
<a class="anchor" href="#aria2-download">#</a>
|
||||
</h1>
|
||||
<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></description></item><item><title>yt-dlp Video Download</title><link>https://sabot.unv.app/en/usage/ytdlp/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/ytdlp/</guid><description><h1 id="yt-dlp-video-download">
|
||||
yt-dlp Video Download
|
||||
<a class="anchor" href="#yt-dlp-video-download">#</a>
|
||||
</h1>
|
||||
<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></description></item><item><title>Storage Transfer</title><link>https://sabot.unv.app/en/usage/transfer/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/transfer/</guid><description><h1 id="storage-transfer">
|
||||
Storage Transfer
|
||||
<a class="anchor" href="#storage-transfer">#</a>
|
||||
</h1>
|
||||
<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></description></item><item><title>Save Files Outside Telegram</title><link>https://sabot.unv.app/en/usage/parsers/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/parsers/</guid><description><h1 id="save-files-outside-telegram">
|
||||
Save Files Outside Telegram
|
||||
<a class="anchor" href="#save-files-outside-telegram">#</a>
|
||||
</h1>
|
||||
<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></description></item><item><title>HTTP API</title><link>https://sabot.unv.app/en/usage/api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/api/</guid><description><h1 id="http-api">
|
||||
HTTP API
|
||||
<a class="anchor" href="#http-api">#</a>
|
||||
</h1>
|
||||
<p>SaveAny-Bot provides an HTTP API that allows you to programmatically create download/transfer tasks, query task status, cancel tasks, and more — without going through Telegram.</p>
|
||||
<h2 id="enabling-the-api">
|
||||
Enabling the API
|
||||
<a class="anchor" href="#enabling-the-api">#</a>
|
||||
</h2>
|
||||
<p>Add or modify the following section in <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">api</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">host</span> = <span style="color:#e6db74">&#34;0.0.0.0&#34;</span> <span style="color:#75715e"># Bind address, default 0.0.0.0</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">port</span> = <span style="color:#ae81ff">8080</span> <span style="color:#75715e"># Listen port, default 8080</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">token</span> = <span style="color:#e6db74">&#34;your-token&#34;</span> <span style="color:#75715e"># Auth token — strongly recommended</span>
|
||||
</span></span></code></pre></div><p>You can also override these settings with environment variables (prefix <code>SAVEANY_</code>):</p></description></item><item><title>Installation and Updates</title><link>https://sabot.unv.app/en/deployment/installation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/deployment/installation/</guid><description><h1 id="installation-and-updates">
|
||||
Installation and Updates
|
||||
<a class="anchor" href="#installation-and-updates">#</a>
|
||||
</h1>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
<!doctype html><html lang=en dir=ltr><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content><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/tags/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="Tags"><meta property="og:locale" content="en"><meta property="og:type" content="website"><title>Tags | 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/tags/><link rel=alternate hreflang=zh href=https://sabot.unv.app/tags/ title=Tags><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/tags/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=/tags/>简体中文</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>Tags</h3><label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav><ul><li class=book-section-flat><span>Categories</span><ul></ul></li><li class=book-section-flat><span>Tags</span><ul></ul></li></ul></nav></aside></header><article class="markdown book-post"><h1>Tags</h1></article><footer class=book-footer><div class="flex flex-wrap justify-between"></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><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav><ul><li class=book-section-flat><span>Categories</span><ul></ul></li><li class=book-section-flat><span>Tags</span><ul></ul></li></ul></nav></div></aside></main></body></html>
|
||||
English</a></label><ul><li><a href=/tags/>简体中文</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><li><a href=/en/usage/silent/>Silent Mode</a></li><li><a href=/en/usage/rules/>Storage Rules</a></li><li><a href=/en/usage/watch/>Watch Chats</a></li><li><a href=/en/usage/directlinks/>Direct Download Links</a></li><li><a href=/en/usage/aria2/>Aria2 Download</a></li><li><a href=/en/usage/ytdlp/>yt-dlp Video Download</a></li><li><a href=/en/usage/transfer/>Storage Transfer</a></li><li><a href=/en/usage/parsers/>Save Files Outside Telegram</a></li><li><a href=/en/usage/api/>HTTP API</a></li></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>Tags</h3><label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav><ul><li class=book-section-flat><span>Categories</span><ul></ul></li><li class=book-section-flat><span>Tags</span><ul></ul></li></ul></nav></aside></header><article class="markdown book-post"><h1>Tags</h1></article><footer class=book-footer><div class="flex flex-wrap justify-between"></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><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav><ul><li class=book-section-flat><span>Categories</span><ul></ul></li><li class=book-section-flat><span>Tags</span><ul></ul></li></ul></nav></div></aside></main></body></html>
|
||||
188
en/usage/api/index.html
Normal file
188
en/usage/api/index.html
Normal file
@@ -0,0 +1,188 @@
|
||||
<!doctype html><html lang=en dir=ltr><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content='
|
||||
HTTP API
|
||||
#
|
||||
|
||||
SaveAny-Bot provides an HTTP API that allows you to programmatically create download/transfer tasks, query task status, cancel tasks, and more — without going through Telegram.
|
||||
|
||||
Enabling the API
|
||||
#
|
||||
|
||||
Add or modify the following section in config.toml:
|
||||
[api]
|
||||
enable = true
|
||||
host = "0.0.0.0" # Bind address, default 0.0.0.0
|
||||
port = 8080 # Listen port, default 8080
|
||||
token = "your-token" # Auth token — strongly recommended
|
||||
You can also override these settings with environment variables (prefix SAVEANY_):'><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/usage/api/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="HTTP API"><meta property="og:description" content='HTTP API # SaveAny-Bot provides an HTTP API that allows you to programmatically create download/transfer tasks, query task status, cancel tasks, and more — without going through Telegram.
|
||||
Enabling the API # Add or modify the following section in config.toml:
|
||||
[api] enable = true host = "0.0.0.0" # Bind address, default 0.0.0.0 port = 8080 # Listen port, default 8080 token = "your-token" # Auth token — strongly recommended You can also override these settings with environment variables (prefix SAVEANY_):'><meta property="og:locale" content="en"><meta property="og:type" content="article"><meta property="article:section" content="usage"><meta property="article:modified_time" content="2026-03-11T19:37:25+08:00"><title>HTTP API | 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/api/><link rel=alternate hreflang=zh href=https://sabot.unv.app/usage/api/ title="HTTP API"><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous></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/api/>简体中文</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><li><a href=/en/usage/silent/>Silent Mode</a></li><li><a href=/en/usage/rules/>Storage Rules</a></li><li><a href=/en/usage/watch/>Watch Chats</a></li><li><a href=/en/usage/directlinks/>Direct Download Links</a></li><li><a href=/en/usage/aria2/>Aria2 Download</a></li><li><a href=/en/usage/ytdlp/>yt-dlp Video Download</a></li><li><a href=/en/usage/transfer/>Storage Transfer</a></li><li><a href=/en/usage/parsers/>Save Files Outside Telegram</a></li><li><a href=/en/usage/api/ class=active>HTTP API</a></li></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>HTTP API</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=#enabling-the-api>Enabling the API</a></li><li><a href=#authentication>Authentication</a></li><li><a href=#error-response-format>Error Response Format</a></li><li><a href=#endpoints>Endpoints</a><ul><li><a href=#get-health--health-check>GET /health — Health Check</a></li><li><a href=#get-apiv1storages--list-storages>GET /api/v1/storages — List Storages</a></li><li><a href=#get-apiv1task-types--list-supported-task-types>GET /api/v1/task-types — List Supported Task Types</a></li><li><a href=#post-apiv1tasks--create-task>POST /api/v1/tasks — Create Task</a></li><li><a href=#get-apiv1tasks--list-all-tasks>GET /api/v1/tasks — List All Tasks</a></li><li><a href=#get-apiv1taskstask_id--get-task>GET /api/v1/tasks/{task_id} — Get Task</a></li><li><a href=#delete-apiv1taskstask_id--cancel-task>DELETE /api/v1/tasks/{task_id} — Cancel Task</a></li></ul></li><li><a href=#task-statuses>Task Statuses</a></li><li><a href=#webhook-callbacks>Webhook Callbacks</a></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=http-api>HTTP API
|
||||
<a class=anchor href=#http-api>#</a></h1><p>SaveAny-Bot provides an HTTP API that allows you to programmatically create download/transfer tasks, query task status, cancel tasks, and more — without going through Telegram.</p><h2 id=enabling-the-api>Enabling the API
|
||||
<a class=anchor href=#enabling-the-api>#</a></h2><p>Add or modify the following section in <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>api</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>host</span> = <span style=color:#e6db74>"0.0.0.0"</span> <span style=color:#75715e># Bind address, default 0.0.0.0</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>port</span> = <span style=color:#ae81ff>8080</span> <span style=color:#75715e># Listen port, default 8080</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>token</span> = <span style=color:#e6db74>"your-token"</span> <span style=color:#75715e># Auth token — strongly recommended</span>
|
||||
</span></span></code></pre></div><p>You can also override these settings with environment variables (prefix <code>SAVEANY_</code>):</p><table><thead><tr><th>Environment Variable</th><th>Config Key</th></tr></thead><tbody><tr><td><code>SAVEANY_API_ENABLE</code></td><td><code>api.enable</code></td></tr><tr><td><code>SAVEANY_API_HOST</code></td><td><code>api.host</code></td></tr><tr><td><code>SAVEANY_API_PORT</code></td><td><code>api.port</code></td></tr><tr><td><code>SAVEANY_API_TOKEN</code></td><td><code>api.token</code></td></tr></tbody></table><blockquote class="book-hint warning">If `token` is empty, the API server will be accessible **without any authentication**, which is a security risk.</blockquote><h2 id=authentication>Authentication
|
||||
<a class=anchor href=#authentication>#</a></h2><p>When <code>token</code> is configured, all API requests must include a Bearer token in the HTTP header:</p><pre tabindex=0><code>Authorization: Bearer <your-token>
|
||||
</code></pre><p>On authentication failure, the server returns <code>401</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-json data-lang=json><span style=display:flex><span>{ <span style=color:#f92672>"error"</span>: <span style=color:#e6db74>"unauthorized"</span>, <span style=color:#f92672>"message"</span>: <span style=color:#e6db74>"invalid token"</span> }
|
||||
</span></span></code></pre></div><h2 id=error-response-format>Error Response Format
|
||||
<a class=anchor href=#error-response-format>#</a></h2><p>All errors use a consistent JSON format:</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-json data-lang=json><span style=display:flex><span>{
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"error"</span>: <span style=color:#e6db74>"error_code"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"message"</span>: <span style=color:#e6db74>"human readable description"</span>
|
||||
</span></span><span style=display:flex><span>}
|
||||
</span></span></code></pre></div><p>Common error codes:</p><table><thead><tr><th>Error Code</th><th>HTTP Status</th><th>Meaning</th></tr></thead><tbody><tr><td><code>unauthorized</code></td><td>401</td><td>Authentication failed</td></tr><tr><td><code>method_not_allowed</code></td><td>405</td><td>Wrong HTTP method</td></tr><tr><td><code>invalid_request</code></td><td>400</td><td>Malformed request body or parameters</td></tr><tr><td><code>task_creation_failed</code></td><td>400</td><td>Failed to create task</td></tr><tr><td><code>task_not_found</code></td><td>404</td><td>Task ID does not exist</td></tr><tr><td><code>cancel_failed</code></td><td>500</td><td>Failed to cancel task</td></tr><tr><td><code>internal_error</code></td><td>500</td><td>Internal server error</td></tr></tbody></table><hr><h2 id=endpoints>Endpoints
|
||||
<a class=anchor href=#endpoints>#</a></h2><h3 id=get-health--health-check>GET /health — Health Check
|
||||
<a class=anchor href=#get-health--health-check>#</a></h3><p>No authentication required.</p><p><strong>Response <code>200 OK</code>:</strong></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-json data-lang=json><span style=display:flex><span>{ <span style=color:#f92672>"status"</span>: <span style=color:#e6db74>"ok"</span> }
|
||||
</span></span></code></pre></div><hr><h3 id=get-apiv1storages--list-storages>GET /api/v1/storages — List Storages
|
||||
<a class=anchor href=#get-apiv1storages--list-storages>#</a></h3><p>Returns all currently loaded storage backends.</p><p><strong>Response <code>200 OK</code>:</strong></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-json data-lang=json><span style=display:flex><span>{
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"storages"</span>: [
|
||||
</span></span><span style=display:flex><span> { <span style=color:#f92672>"name"</span>: <span style=color:#e6db74>"local"</span>, <span style=color:#f92672>"type"</span>: <span style=color:#e6db74>"local"</span> },
|
||||
</span></span><span style=display:flex><span> { <span style=color:#f92672>"name"</span>: <span style=color:#e6db74>"MyMinio"</span>, <span style=color:#f92672>"type"</span>: <span style=color:#e6db74>"s3"</span> }
|
||||
</span></span><span style=display:flex><span> ]
|
||||
</span></span><span style=display:flex><span>}
|
||||
</span></span></code></pre></div><hr><h3 id=get-apiv1task-types--list-supported-task-types>GET /api/v1/task-types — List Supported Task Types
|
||||
<a class=anchor href=#get-apiv1task-types--list-supported-task-types>#</a></h3><p><strong>Response <code>200 OK</code>:</strong></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-json data-lang=json><span style=display:flex><span>{
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"types"</span>: [
|
||||
</span></span><span style=display:flex><span> <span style=color:#e6db74>"directlinks"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#e6db74>"ytdlp"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#e6db74>"aria2"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#e6db74>"parseditem"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#e6db74>"tgfiles"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#e6db74>"tphpics"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#e6db74>"transfer"</span>
|
||||
</span></span><span style=display:flex><span> ]
|
||||
</span></span><span style=display:flex><span>}
|
||||
</span></span></code></pre></div><hr><h3 id=post-apiv1tasks--create-task>POST /api/v1/tasks — Create Task
|
||||
<a class=anchor href=#post-apiv1tasks--create-task>#</a></h3><p><strong>Request headers:</strong></p><pre tabindex=0><code>Content-Type: application/json
|
||||
Authorization: Bearer <token>
|
||||
</code></pre><p><strong>Request body:</strong></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-json data-lang=json><span style=display:flex><span>{
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"type"</span>: <span style=color:#e6db74>"<task_type>"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"storage"</span>: <span style=color:#e6db74>"<storage_name>"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"path"</span>: <span style=color:#e6db74>"<subpath>"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"webhook"</span>: <span style=color:#e6db74>"<callback_url>"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"params"</span>: { }
|
||||
</span></span><span style=display:flex><span>}
|
||||
</span></span></code></pre></div><table><thead><tr><th>Field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td><code>type</code></td><td>string</td><td>Yes</td><td>Task type — see below</td></tr><tr><td><code>storage</code></td><td>string</td><td>Yes</td><td>Target storage name, must match a name in your config</td></tr><tr><td><code>path</code></td><td>string</td><td>No</td><td>Subdirectory path within the storage</td></tr><tr><td><code>webhook</code></td><td>string</td><td>No</td><td>Callback URL invoked when the task reaches a terminal state</td></tr><tr><td><code>params</code></td><td>object</td><td>Yes</td><td>Type-specific parameters — see below</td></tr></tbody></table><p><strong>Response <code>201 Created</code>:</strong></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-json data-lang=json><span style=display:flex><span>{
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"task_id"</span>: <span style=color:#e6db74>"abc123xyz"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"type"</span>: <span style=color:#e6db74>"directlinks"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"status"</span>: <span style=color:#e6db74>"queued"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"created_at"</span>: <span style=color:#e6db74>"2026-03-11T10:00:00Z"</span>
|
||||
</span></span><span style=display:flex><span>}
|
||||
</span></span></code></pre></div><h4 id=task-types-and-params>Task Types and params
|
||||
<a class=anchor href=#task-types-and-params>#</a></h4><h5 id=directlinks--direct-url-download>directlinks — Direct URL Download
|
||||
<a class=anchor href=#directlinks--direct-url-download>#</a></h5><p>Download one or more files from direct HTTP/HTTPS URLs.</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-json data-lang=json><span style=display:flex><span>{
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"type"</span>: <span style=color:#e6db74>"directlinks"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"storage"</span>: <span style=color:#e6db74>"local"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"path"</span>: <span style=color:#e6db74>"downloads"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"params"</span>: {
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"urls"</span>: [
|
||||
</span></span><span style=display:flex><span> <span style=color:#e6db74>"https://example.com/file.zip"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#e6db74>"https://example.com/other.zip"</span>
|
||||
</span></span><span style=display:flex><span> ]
|
||||
</span></span><span style=display:flex><span> }
|
||||
</span></span><span style=display:flex><span>}
|
||||
</span></span></code></pre></div><table><thead><tr><th>params field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td><code>urls</code></td><td>[]string</td><td>Yes</td><td>List of download URLs, at least 1</td></tr></tbody></table><h5 id=ytdlp--yt-dlp-media-download>ytdlp — yt-dlp Media Download
|
||||
<a class=anchor href=#ytdlp--yt-dlp-media-download>#</a></h5><blockquote class="book-hint warning">Requires yt-dlp to be installed on the system.</blockquote><p>Download videos or audio via yt-dlp, supporting YouTube, Bilibili, 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-json data-lang=json><span style=display:flex><span>{
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"type"</span>: <span style=color:#e6db74>"ytdlp"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"storage"</span>: <span style=color:#e6db74>"local"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"path"</span>: <span style=color:#e6db74>"videos"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"params"</span>: {
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"urls"</span>: [<span style=color:#e6db74>"https://www.youtube.com/watch?v=xxx"</span>],
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"flags"</span>: [<span style=color:#e6db74>"--extract-audio"</span>, <span style=color:#e6db74>"--audio-format"</span>, <span style=color:#e6db74>"mp3"</span>]
|
||||
</span></span><span style=display:flex><span> }
|
||||
</span></span><span style=display:flex><span>}
|
||||
</span></span></code></pre></div><table><thead><tr><th>params field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td><code>urls</code></td><td>[]string</td><td>Yes</td><td>List of media URLs, at least 1</td></tr><tr><td><code>flags</code></td><td>[]string</td><td>No</td><td>Extra yt-dlp command-line flags</td></tr></tbody></table><h5 id=aria2--aria2-download>aria2 — Aria2 Download
|
||||
<a class=anchor href=#aria2--aria2-download>#</a></h5><blockquote class="book-hint warning">Requires Aria2 to be enabled and configured (RPC) in the config file.</blockquote><p>Download files via the Aria2 download manager, supporting HTTP/HTTPS, FTP, BitTorrent (magnet links, torrent files), and more.</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-json data-lang=json><span style=display:flex><span>{
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"type"</span>: <span style=color:#e6db74>"aria2"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"storage"</span>: <span style=color:#e6db74>"local"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"path"</span>: <span style=color:#e6db74>"downloads"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"params"</span>: {
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"urls"</span>: [<span style=color:#e6db74>"magnet:?xt=urn:btih:..."</span>],
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"options"</span>: { <span style=color:#f92672>"split"</span>: <span style=color:#e6db74>"4"</span> }
|
||||
</span></span><span style=display:flex><span> }
|
||||
</span></span><span style=display:flex><span>}
|
||||
</span></span></code></pre></div><table><thead><tr><th>params field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td><code>urls</code></td><td>[]string</td><td>Yes</td><td>List of download URIs, at least 1</td></tr><tr><td><code>options</code></td><td>map[string]string</td><td>No</td><td>Aria2 download options</td></tr></tbody></table><h5 id=parseditem--parser-plugin-download>parseditem — Parser Plugin Download
|
||||
<a class=anchor href=#parseditem--parser-plugin-download>#</a></h5><p>Hand a URL off to a registered JS plugin or built-in parser for processing and downloading.</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-json data-lang=json><span style=display:flex><span>{
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"type"</span>: <span style=color:#e6db74>"parseditem"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"storage"</span>: <span style=color:#e6db74>"local"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"path"</span>: <span style=color:#e6db74>"parsed"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"params"</span>: {
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"url"</span>: <span style=color:#e6db74>"https://some-site.com/page"</span>
|
||||
</span></span><span style=display:flex><span> }
|
||||
</span></span><span style=display:flex><span>}
|
||||
</span></span></code></pre></div><table><thead><tr><th>params field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td><code>url</code></td><td>string</td><td>Yes</td><td>The URL to parse</td></tr></tbody></table><p>Returns <code>400 task_creation_failed</code> if no parser is able to handle the URL.</p><h5 id=tgfiles--telegram-message-file-download>tgfiles — Telegram Message File Download
|
||||
<a class=anchor href=#tgfiles--telegram-message-file-download>#</a></h5><p>Download files from Telegram messages via message links. Supported link formats:</p><ul><li><code>https://t.me/username/123</code> — public channel or group</li><li><code>https://t.me/c/123456789/123</code> — private channel by numeric ID</li><li><code>https://t.me/c/123456789/111/456</code> — topic message (thread ID / message ID)</li><li><code>https://t.me/username/111/456</code> — topic under a username-based chat</li></ul><p>If the message is part of a media group (album), all files in the group are downloaded by default. Append <code>?single</code> to the link to force downloading only the single specified message.</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-json data-lang=json><span style=display:flex><span>{
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"type"</span>: <span style=color:#e6db74>"tgfiles"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"storage"</span>: <span style=color:#e6db74>"local"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"path"</span>: <span style=color:#e6db74>"telegram"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"params"</span>: {
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"message_links"</span>: [
|
||||
</span></span><span style=display:flex><span> <span style=color:#e6db74>"https://t.me/username/123"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#e6db74>"https://t.me/c/1234567890/456"</span>
|
||||
</span></span><span style=display:flex><span> ]
|
||||
</span></span><span style=display:flex><span> }
|
||||
</span></span><span style=display:flex><span>}
|
||||
</span></span></code></pre></div><table><thead><tr><th>params field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td><code>message_links</code></td><td>[]string</td><td>Yes</td><td>List of Telegram message links, at least 1</td></tr></tbody></table><h5 id=tphpics--telegraph-article-images>tphpics — Telegraph Article Images
|
||||
<a class=anchor href=#tphpics--telegraph-article-images>#</a></h5><p>Download all images from a Telegra.ph article.</p><p>Supported URL prefixes: <code>https://telegra.ph/</code>, <code>http://telegra.ph/</code>, <code>https://telegraph.co/</code>, <code>http://telegraph.co/</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-json data-lang=json><span style=display:flex><span>{
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"type"</span>: <span style=color:#e6db74>"tphpics"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"storage"</span>: <span style=color:#e6db74>"local"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"path"</span>: <span style=color:#e6db74>"telegraph"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"params"</span>: {
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"telegraph_url"</span>: <span style=color:#e6db74>"https://telegra.ph/Some-Article-01-01"</span>
|
||||
</span></span><span style=display:flex><span> }
|
||||
</span></span><span style=display:flex><span>}
|
||||
</span></span></code></pre></div><table><thead><tr><th>params field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td><code>telegraph_url</code></td><td>string</td><td>Yes</td><td>URL of the Telegra.ph article</td></tr></tbody></table><h5 id=transfer--storage-to-storage-transfer>transfer — Storage-to-Storage Transfer
|
||||
<a class=anchor href=#transfer--storage-to-storage-transfer>#</a></h5><p>Transfer files directly between two storage backends without going through Telegram. The source storage must support both listing and reading.</p><blockquote class="book-hint info">For `transfer` tasks, the top-level `storage` field is still required for validation, but the actual storages used are determined by `source_storage` and `target_storage` inside `params`.</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-json data-lang=json><span style=display:flex><span>{
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"type"</span>: <span style=color:#e6db74>"transfer"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"storage"</span>: <span style=color:#e6db74>"local"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"params"</span>: {
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"source_storage"</span>: <span style=color:#e6db74>"MyS3"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"source_path"</span>: <span style=color:#e6db74>"backups/"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"target_storage"</span>: <span style=color:#e6db74>"LocalDisk"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"target_path"</span>: <span style=color:#e6db74>"restored/"</span>
|
||||
</span></span><span style=display:flex><span> }
|
||||
</span></span><span style=display:flex><span>}
|
||||
</span></span></code></pre></div><table><thead><tr><th>params field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td><code>source_storage</code></td><td>string</td><td>Yes</td><td>Source storage name</td></tr><tr><td><code>source_path</code></td><td>string</td><td>Yes</td><td>Path within the source storage; must contain at least one file</td></tr><tr><td><code>target_storage</code></td><td>string</td><td>Yes</td><td>Target storage name</td></tr><tr><td><code>target_path</code></td><td>string</td><td>Yes</td><td>Destination path within the target storage</td></tr></tbody></table><hr><h3 id=get-apiv1tasks--list-all-tasks>GET /api/v1/tasks — List All Tasks
|
||||
<a class=anchor href=#get-apiv1tasks--list-all-tasks>#</a></h3><p>Returns all tasks created via the API. Task records are stored in memory only and are cleared on restart.</p><p><strong>Response <code>200 OK</code>:</strong></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-json data-lang=json><span style=display:flex><span>{
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"tasks"</span>: [
|
||||
</span></span><span style=display:flex><span> {
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"task_id"</span>: <span style=color:#e6db74>"abc123xyz"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"type"</span>: <span style=color:#e6db74>"directlinks"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"status"</span>: <span style=color:#e6db74>"running"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"title"</span>: <span style=color:#e6db74>"file.zip"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"storage"</span>: <span style=color:#e6db74>"local"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"path"</span>: <span style=color:#e6db74>"downloads"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"error"</span>: <span style=color:#e6db74>""</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"created_at"</span>: <span style=color:#e6db74>"2026-03-11T10:00:00Z"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"updated_at"</span>: <span style=color:#e6db74>"2026-03-11T10:00:05Z"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"progress"</span>: {
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"total_bytes"</span>: <span style=color:#ae81ff>10485760</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"downloaded_bytes"</span>: <span style=color:#ae81ff>5242880</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"percent"</span>: <span style=color:#ae81ff>50.0</span>
|
||||
</span></span><span style=display:flex><span> }
|
||||
</span></span><span style=display:flex><span> }
|
||||
</span></span><span style=display:flex><span> ],
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"total"</span>: <span style=color:#ae81ff>1</span>
|
||||
</span></span><span style=display:flex><span>}
|
||||
</span></span></code></pre></div><p>The <code>progress</code> field is only included when <code>total_bytes > 0</code>. The <code>error</code> field is only included when non-empty.</p><hr><h3 id=get-apiv1taskstask_id--get-task>GET /api/v1/tasks/{task_id} — Get Task
|
||||
<a class=anchor href=#get-apiv1taskstask_id--get-task>#</a></h3><p><strong>Path parameter:</strong> <code>task_id</code> — the ID returned when the task was created.</p><p><strong>Response <code>200 OK</code>:</strong> Same structure as a single task object from the list above.</p><p><strong>Error responses:</strong></p><ul><li><code>400 invalid_request</code> — no task ID in path</li><li><code>404 task_not_found</code> — task does not exist</li></ul><hr><h3 id=delete-apiv1taskstask_id--cancel-task>DELETE /api/v1/tasks/{task_id} — Cancel Task
|
||||
<a class=anchor href=#delete-apiv1taskstask_id--cancel-task>#</a></h3><p><strong>Path parameter:</strong> <code>task_id</code></p><p><strong>Response <code>200 OK</code>:</strong></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-json data-lang=json><span style=display:flex><span>{ <span style=color:#f92672>"message"</span>: <span style=color:#e6db74>"task cancelled successfully"</span> }
|
||||
</span></span></code></pre></div><p><strong>Error responses:</strong></p><ul><li><code>400 invalid_request</code> — no task ID in path</li><li><code>404 task_not_found</code> — task does not exist</li><li><code>500 cancel_failed</code> — cancellation failed</li></ul><hr><h2 id=task-statuses>Task Statuses
|
||||
<a class=anchor href=#task-statuses>#</a></h2><table><thead><tr><th>Status</th><th>Meaning</th></tr></thead><tbody><tr><td><code>queued</code></td><td>Task is queued and waiting to run</td></tr><tr><td><code>running</code></td><td>Task is currently executing</td></tr><tr><td><code>completed</code></td><td>Task finished successfully</td></tr><tr><td><code>failed</code></td><td>Task encountered an error</td></tr><tr><td><code>cancelled</code></td><td>Task was cancelled via the DELETE endpoint</td></tr></tbody></table><hr><h2 id=webhook-callbacks>Webhook Callbacks
|
||||
<a class=anchor href=#webhook-callbacks>#</a></h2><p>When a <code>webhook</code> URL is provided in the create request, SaveAny-Bot sends a <code>POST</code> request to that URL when the task reaches a terminal state (<code>completed</code>, <code>failed</code>, or <code>cancelled</code>).</p><p><strong>Callback request headers:</strong></p><pre tabindex=0><code>Content-Type: application/json
|
||||
User-Agent: SaveAny-Bot/1.0
|
||||
</code></pre><p><strong>Callback request body:</strong></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-json data-lang=json><span style=display:flex><span>{
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"task_id"</span>: <span style=color:#e6db74>"abc123xyz"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"type"</span>: <span style=color:#e6db74>"directlinks"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"status"</span>: <span style=color:#e6db74>"completed"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"storage"</span>: <span style=color:#e6db74>"local"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"path"</span>: <span style=color:#e6db74>"downloads"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"completed_at"</span>: <span style=color:#e6db74>"2026-03-11T10:01:00Z"</span>,
|
||||
</span></span><span style=display:flex><span> <span style=color:#f92672>"error"</span>: <span style=color:#e6db74>""</span>
|
||||
</span></span><span style=display:flex><span>}
|
||||
</span></span></code></pre></div><p><code>completed_at</code> is only present when status is <code>completed</code> or <code>failed</code>. <code>error</code> is only present when non-empty.</p><p><strong>Retry policy:</strong> Up to 3 attempts, with delays of 1s, 2s, and 3s between retries. Each request has a 30-second timeout.</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/38355dfd142f0f1a819a8837875b33da0d3a81b7 title='Last modified by krau | 2026/03/11' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
|
||||
<span>2026/03/11</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/usage/api.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=#enabling-the-api>Enabling the API</a></li><li><a href=#authentication>Authentication</a></li><li><a href=#error-response-format>Error Response Format</a></li><li><a href=#endpoints>Endpoints</a><ul><li><a href=#get-health--health-check>GET /health — Health Check</a></li><li><a href=#get-apiv1storages--list-storages>GET /api/v1/storages — List Storages</a></li><li><a href=#get-apiv1task-types--list-supported-task-types>GET /api/v1/task-types — List Supported Task Types</a></li><li><a href=#post-apiv1tasks--create-task>POST /api/v1/tasks — Create Task</a></li><li><a href=#get-apiv1tasks--list-all-tasks>GET /api/v1/tasks — List All Tasks</a></li><li><a href=#get-apiv1taskstask_id--get-task>GET /api/v1/tasks/{task_id} — Get Task</a></li><li><a href=#delete-apiv1taskstask_id--cancel-task>DELETE /api/v1/tasks/{task_id} — Cancel Task</a></li></ul></li><li><a href=#task-statuses>Task Statuses</a></li><li><a href=#webhook-callbacks>Webhook Callbacks</a></li></ul></nav></div></aside></main></body></html>
|
||||
44
en/usage/aria2/index.html
Normal file
44
en/usage/aria2/index.html
Normal file
@@ -0,0 +1,44 @@
|
||||
<!doctype html><html lang=en dir=ltr><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="
|
||||
Aria2 Download
|
||||
#
|
||||
|
||||
|
||||
|
||||
This feature requires enabling Aria2 in the configuration file and configuring the RPC connection.
|
||||
|
||||
|
||||
|
||||
Use the /aria2dl command to download files via the Aria2 download manager, supporting HTTP/HTTPS, FTP, BitTorrent, and other protocols.
|
||||
/aria2dl <uri1> [uri2] [uri3] ...
|
||||
Examples:
|
||||
# Download HTTP link
|
||||
/aria2dl https://example.com/file.zip
|
||||
|
||||
# Download magnet link
|
||||
/aria2dl magnet:?xt=urn:btih:...
|
||||
|
||||
# Download torrent file (need to upload .torrent file first)
|
||||
/aria2dl https://example.com/file.torrent
|
||||
Configure 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/en/usage/aria2/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="Aria2 Download"><meta property="og:description" content="Aria2 Download # This feature requires enabling Aria2 in the configuration file and configuring the RPC connection. Use the /aria2dl command to download files via the Aria2 download manager, supporting HTTP/HTTPS, FTP, BitTorrent, and other protocols.
|
||||
/aria2dl <uri1> [uri2] [uri3] ... Examples:
|
||||
# Download HTTP link /aria2dl https://example.com/file.zip # Download magnet link /aria2dl magnet:?xt=urn:btih:... # Download torrent file (need to upload .torrent file first) /aria2dl https://example.com/file.torrent Configure Aria2:"><meta property="og:locale" content="en"><meta property="og:type" content="article"><meta property="article:section" content="usage"><meta property="article:modified_time" content="2026-03-11T19:37:25+08:00"><title>Aria2 Download | 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/aria2/><link rel=alternate hreflang=zh href=https://sabot.unv.app/usage/aria2/ title="Aria2 下载"><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous></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/aria2/>简体中文</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><li><a href=/en/usage/silent/>Silent Mode</a></li><li><a href=/en/usage/rules/>Storage Rules</a></li><li><a href=/en/usage/watch/>Watch Chats</a></li><li><a href=/en/usage/directlinks/>Direct Download Links</a></li><li><a href=/en/usage/aria2/ class=active>Aria2 Download</a></li><li><a href=/en/usage/ytdlp/>yt-dlp Video Download</a></li><li><a href=/en/usage/transfer/>Storage Transfer</a></li><li><a href=/en/usage/parsers/>Save Files Outside Telegram</a></li><li><a href=/en/usage/api/>HTTP API</a></li></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>Aria2 Download</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></nav></aside></header><article class="markdown book-article"><h1 id=aria2-download>Aria2 Download
|
||||
<a class=anchor href=#aria2-download>#</a></h1><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 <uri1> <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>"http://localhost:6800/jsonrpc"</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>secret</span> = <span style=color:#e6db74>"your-rpc-secret"</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></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/38355dfd142f0f1a819a8837875b33da0d3a81b7 title='Last modified by krau | 2026/03/11' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
|
||||
<span>2026/03/11</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/usage/aria2.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></nav></div></aside></main></body></html>
|
||||
21
en/usage/directlinks/index.html
Normal file
21
en/usage/directlinks/index.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!doctype html><html lang=en dir=ltr><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="
|
||||
Direct Download Links
|
||||
#
|
||||
|
||||
Use the /dl command to directly download one or more HTTP/HTTPS files to storage.
|
||||
/dl <url1> [url2] [url3] ...
|
||||
Examples:
|
||||
/dl https://example.com/file.zip
|
||||
/dl https://example.com/file1.zip https://example.com/file2.zip
|
||||
The bot will validate the link format and then ask you to select the target storage location."><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/usage/directlinks/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="Direct Download Links"><meta property="og:description" content="Direct Download Links # Use the /dl command to directly download one or more HTTP/HTTPS files to storage.
|
||||
/dl <url1> [url2] [url3] ... Examples:
|
||||
/dl https://example.com/file.zip /dl https://example.com/file1.zip https://example.com/file2.zip The bot will validate the link format and then ask you to select the target storage location."><meta property="og:locale" content="en"><meta property="og:type" content="article"><meta property="article:section" content="usage"><meta property="article:modified_time" content="2026-03-11T19:37:25+08:00"><title>Direct Download Links | 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/directlinks/><link rel=alternate hreflang=zh href=https://sabot.unv.app/usage/directlinks/ title=直接下载链接><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous></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/directlinks/>简体中文</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><li><a href=/en/usage/silent/>Silent Mode</a></li><li><a href=/en/usage/rules/>Storage Rules</a></li><li><a href=/en/usage/watch/>Watch Chats</a></li><li><a href=/en/usage/directlinks/ class=active>Direct Download Links</a></li><li><a href=/en/usage/aria2/>Aria2 Download</a></li><li><a href=/en/usage/ytdlp/>yt-dlp Video Download</a></li><li><a href=/en/usage/transfer/>Storage Transfer</a></li><li><a href=/en/usage/parsers/>Save Files Outside Telegram</a></li><li><a href=/en/usage/api/>HTTP API</a></li></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>Direct Download Links</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></nav></aside></header><article class="markdown book-article"><h1 id=direct-download-links>Direct Download Links
|
||||
<a class=anchor href=#direct-download-links>#</a></h1><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 <url1> <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></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/38355dfd142f0f1a819a8837875b33da0d3a81b7 title='Last modified by krau | 2026/03/11' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
|
||||
<span>2026/03/11</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/usage/directlinks.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></nav></div></aside></main></body></html>
|
||||
@@ -12,75 +12,13 @@ To use the bot’s Telegram file saving feature, you need to send or forward
|
||||
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 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/usage/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="Usage"><meta property="og:description" content="Usage # This page introduces some of Save Any Bot’s features and basic usage. If you can’t find what you need here, please also see the Configuration Guide or ask in GitHub Discussions.
|
||||
"><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/usage/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="Usage"><meta property="og:description" content="Usage # This page introduces some of Save Any Bot’s features and basic usage. If you can’t find what you need here, please also see the Configuration Guide or ask in GitHub Discussions.
|
||||
File Transfer # To use the bot’s Telegram file saving feature, you need to send or forward the following types of messages to the bot:
|
||||
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>
|
||||
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."><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=#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
|
||||
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><li><a href=/en/usage/silent/>Silent Mode</a></li><li><a href=/en/usage/rules/>Storage Rules</a></li><li><a href=/en/usage/watch/>Watch Chats</a></li><li><a href=/en/usage/directlinks/>Direct Download Links</a></li><li><a href=/en/usage/aria2/>Aria2 Download</a></li><li><a href=/en/usage/ytdlp/>yt-dlp Video Download</a></li><li><a href=/en/usage/transfer/>Storage Transfer</a></li><li><a href=/en/usage/parsers/>Save Files Outside Telegram</a></li><li><a href=/en/usage/api/>HTTP API</a></li></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></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’s features and basic usage. If you can’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’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
|
||||
<a class=anchor href=#storage-rules>#</a></h2><p>Storage rules allow you to define redirection rules when the bot uploads files to storage, so that saved files are automatically organized.</p><p>See: <a href=https://github.com/krau/SaveAny-Bot/issues/28 target=_blank>#28</a></p><p>Currently supported rule types:</p><ol><li>FILENAME-REGEX</li><li>MESSAGE-REGEX</li><li>IS-ALBUM</li></ol><p>Basic syntax for adding rules:</p><p>“RuleType RuleContent StorageName Path”</p><p>Pay attention to spaces; the bot can only parse correctly formatted syntax. Below is an example of a valid rule command:</p><pre tabindex=0><code>/rule add FILENAME-REGEX (?i)\.(mp4|mkv|ts|avi|flv)$ MyAlist /videos
|
||||
</code></pre><p>In addition, if <code>CHOSEN</code> is used as the storage name in the rule, it means files will be stored under the path of the storage you selected by clicking the inline button.</p><p>Rule types:</p><h3 id=filename-regex>FILENAME-REGEX
|
||||
<a class=anchor href=#filename-regex>#</a></h3><p>Matches based on filename regex. The rule content must be a valid regular expression, such as:</p><pre tabindex=0><code>FILENAME-REGEX (?i)\.(mp4|mkv|ts|avi|flv)$ MyAlist /videos
|
||||
</code></pre><p>This means files with extensions mp4, mkv, ts, avi, flv will be saved to the <code>/videos</code> directory in the storage named <code>MyAlist</code> (also affected by the <code>base_path</code> in the configuration file).</p><h3 id=message-regex>MESSAGE-REGEX
|
||||
<a class=anchor href=#message-regex>#</a></h3><p>Similar to the above, but matches based on the text content of the message itself.</p><h3 id=is-album>IS-ALBUM
|
||||
<a class=anchor href=#is-album>#</a></h3><p>Matches album messages (media groups). Rule content can only be <code>true</code> or <code>false</code>.</p><p>If the path in the rule uses <code>NEW-FOR-ALBUM</code>, the bot will create a new folder for each media group and store all files of that group there. See: <a href=https://github.com/krau/SaveAny-Bot/issues/87>https://github.com/krau/SaveAny-Bot/issues/87</a></p><p>For example:</p><pre tabindex=0><code>IS-ALBUM true MyWebdav NEW-FOR-ALBUM
|
||||
</code></pre><p>This will save media-group messages to the storage named <code>MyWebdav</code>, creating a new folder (generated from the first file) for each album.</p><h2 id=watch-chats>Watch Chats
|
||||
<a class=anchor href=#watch-chats>#</a></h2><blockquote class="book-hint warning">This feature requires enabling UserBot integration.</blockquote><p>You can watch messages in a specific chat and automatically save them to the default storage, following storage rules. You can also add filters so that only matching messages are saved.</p><p>Watch a chat:</p><pre tabindex=0><code>/watch <chat_id/username> [filter]
|
||||
</code></pre><p>Stop watching:</p><pre tabindex=0><code>/unwatch <chat_id/username>
|
||||
</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=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 <url1> <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 <uri1> <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>"http://localhost:6800/jsonrpc"</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>secret</span> = <span style=color:#e6db74>"your-rpc-secret"</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 <url1> <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 <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 <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 <source_storage>:/<source_path> <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>".*\.mp4</span>$<span style=color:#e6db74>"</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>"(?i)\.(jpg|png|gif)</span>$<span style=color:#e6db74>"</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>
|
||||
<a class=anchor href=#file-transfer>#</a></h2><p>To use the bot’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></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/38355dfd142f0f1a819a8837875b33da0d3a81b7 title='Last modified by krau | 2026/03/11' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
|
||||
<span>2026/03/11</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></ul></nav></div></aside></main></body></html>
|
||||
@@ -1 +1,148 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Usage on Save Any Bot</title><link>https://sabot.unv.app/en/usage/</link><description>Recent content in Usage on Save Any Bot</description><generator>Hugo</generator><language>en</language><atom:link href="https://sabot.unv.app/en/usage/index.xml" rel="self" type="application/rss+xml"/></channel></rss>
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Usage on Save Any Bot</title><link>https://sabot.unv.app/en/usage/</link><description>Recent content in Usage on Save Any Bot</description><generator>Hugo</generator><language>en</language><atom:link href="https://sabot.unv.app/en/usage/index.xml" rel="self" type="application/rss+xml"/><item><title>Silent Mode</title><link>https://sabot.unv.app/en/usage/silent/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/silent/</guid><description><h1 id="silent-mode-silent">
|
||||
Silent Mode (silent)
|
||||
<a class="anchor" href="#silent-mode-silent">#</a>
|
||||
</h1>
|
||||
<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></description></item><item><title>Storage Rules</title><link>https://sabot.unv.app/en/usage/rules/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/rules/</guid><description><h1 id="storage-rules">
|
||||
Storage Rules
|
||||
<a class="anchor" href="#storage-rules">#</a>
|
||||
</h1>
|
||||
<p>Storage rules allow you to define redirection rules when the bot uploads files to storage, so that saved files are automatically organized.</p>
|
||||
<p>See: <a href="https://github.com/krau/SaveAny-Bot/issues/28" target="_blank">#28</a></p>
|
||||
<p>Currently supported rule types:</p>
|
||||
<ol>
|
||||
<li>FILENAME-REGEX</li>
|
||||
<li>MESSAGE-REGEX</li>
|
||||
<li>IS-ALBUM</li>
|
||||
</ol>
|
||||
<p>Basic syntax for adding rules:</p>
|
||||
<p>&ldquo;RuleType RuleContent StorageName Path&rdquo;</p>
|
||||
<p>Pay attention to spaces; the bot can only parse correctly formatted syntax. Below is an example of a valid rule command:</p>
|
||||
<pre tabindex="0"><code>/rule add FILENAME-REGEX (?i)\.(mp4|mkv|ts|avi|flv)$ MyAlist /videos
|
||||
</code></pre><p>In addition, if <code>CHOSEN</code> is used as the storage name in the rule, it means files will be stored under the path of the storage you selected by clicking the inline button.</p></description></item><item><title>Watch Chats</title><link>https://sabot.unv.app/en/usage/watch/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/watch/</guid><description><h1 id="watch-chats">
|
||||
Watch Chats
|
||||
<a class="anchor" href="#watch-chats">#</a>
|
||||
</h1>
|
||||
<blockquote class="book-hint warning">
|
||||
|
||||
This feature requires enabling UserBot integration.
|
||||
|
||||
</blockquote>
|
||||
|
||||
<p>You can watch messages in a specific chat and automatically save them to the default storage, following storage rules. You can also add filters so that only matching messages are saved.</p>
|
||||
<p>Watch a chat:</p>
|
||||
<pre tabindex="0"><code>/watch &lt;chat_id/username&gt; [filter]
|
||||
</code></pre><p>Stop watching:</p>
|
||||
<pre tabindex="0"><code>/unwatch &lt;chat_id/username&gt;
|
||||
</code></pre><p>Filter types:</p>
|
||||
<h2 id="msgre">
|
||||
msgre
|
||||
<a class="anchor" href="#msgre">#</a>
|
||||
</h2>
|
||||
<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></description></item><item><title>Direct Download Links</title><link>https://sabot.unv.app/en/usage/directlinks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/directlinks/</guid><description><h1 id="direct-download-links">
|
||||
Direct Download Links
|
||||
<a class="anchor" href="#direct-download-links">#</a>
|
||||
</h1>
|
||||
<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></description></item><item><title>Aria2 Download</title><link>https://sabot.unv.app/en/usage/aria2/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/aria2/</guid><description><h1 id="aria2-download">
|
||||
Aria2 Download
|
||||
<a class="anchor" href="#aria2-download">#</a>
|
||||
</h1>
|
||||
<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></description></item><item><title>yt-dlp Video Download</title><link>https://sabot.unv.app/en/usage/ytdlp/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/ytdlp/</guid><description><h1 id="yt-dlp-video-download">
|
||||
yt-dlp Video Download
|
||||
<a class="anchor" href="#yt-dlp-video-download">#</a>
|
||||
</h1>
|
||||
<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></description></item><item><title>Storage Transfer</title><link>https://sabot.unv.app/en/usage/transfer/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/transfer/</guid><description><h1 id="storage-transfer">
|
||||
Storage Transfer
|
||||
<a class="anchor" href="#storage-transfer">#</a>
|
||||
</h1>
|
||||
<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></description></item><item><title>Save Files Outside Telegram</title><link>https://sabot.unv.app/en/usage/parsers/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/parsers/</guid><description><h1 id="save-files-outside-telegram">
|
||||
Save Files Outside Telegram
|
||||
<a class="anchor" href="#save-files-outside-telegram">#</a>
|
||||
</h1>
|
||||
<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></description></item><item><title>HTTP API</title><link>https://sabot.unv.app/en/usage/api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/api/</guid><description><h1 id="http-api">
|
||||
HTTP API
|
||||
<a class="anchor" href="#http-api">#</a>
|
||||
</h1>
|
||||
<p>SaveAny-Bot provides an HTTP API that allows you to programmatically create download/transfer tasks, query task status, cancel tasks, and more — without going through Telegram.</p>
|
||||
<h2 id="enabling-the-api">
|
||||
Enabling the API
|
||||
<a class="anchor" href="#enabling-the-api">#</a>
|
||||
</h2>
|
||||
<p>Add or modify the following section in <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">api</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">host</span> = <span style="color:#e6db74">&#34;0.0.0.0&#34;</span> <span style="color:#75715e"># Bind address, default 0.0.0.0</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">port</span> = <span style="color:#ae81ff">8080</span> <span style="color:#75715e"># Listen port, default 8080</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">token</span> = <span style="color:#e6db74">&#34;your-token&#34;</span> <span style="color:#75715e"># Auth token — strongly recommended</span>
|
||||
</span></span></code></pre></div><p>You can also override these settings with environment variables (prefix <code>SAVEANY_</code>):</p></description></item></channel></rss>
|
||||
21
en/usage/parsers/index.html
Normal file
21
en/usage/parsers/index.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!doctype html><html lang=en dir=ltr><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="
|
||||
Save Files Outside Telegram
|
||||
#
|
||||
|
||||
Besides files on Telegram, the bot can also save files from other websites via JavaScript plugins or built-in parsers.
|
||||
|
||||
See the Contributing Parsers document for details.
|
||||
Just send links that match the requirements of a parser to the bot. Currently built-in parsers include:
|
||||
|
||||
Twitter
|
||||
Kemono
|
||||
"><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/usage/parsers/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="Save Files Outside Telegram"><meta property="og:description" content="Save Files Outside Telegram # Besides files on Telegram, the bot can also save files from other websites via JavaScript plugins or built-in parsers.
|
||||
See the Contributing Parsers document for details.
|
||||
Just send links that match the requirements of a parser to the bot. Currently built-in parsers include:
|
||||
Twitter Kemono"><meta property="og:locale" content="en"><meta property="og:type" content="article"><meta property="article:section" content="usage"><meta property="article:modified_time" content="2026-03-11T19:37:25+08:00"><title>Save Files Outside Telegram | 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/parsers/><link rel=alternate hreflang=zh href=https://sabot.unv.app/usage/parsers/ title="转存 Telegram 之外的文件"><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous></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/parsers/>简体中文</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><li><a href=/en/usage/silent/>Silent Mode</a></li><li><a href=/en/usage/rules/>Storage Rules</a></li><li><a href=/en/usage/watch/>Watch Chats</a></li><li><a href=/en/usage/directlinks/>Direct Download Links</a></li><li><a href=/en/usage/aria2/>Aria2 Download</a></li><li><a href=/en/usage/ytdlp/>yt-dlp Video Download</a></li><li><a href=/en/usage/transfer/>Storage Transfer</a></li><li><a href=/en/usage/parsers/ class=active>Save Files Outside Telegram</a></li><li><a href=/en/usage/api/>HTTP API</a></li></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>Save Files Outside Telegram</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></nav></aside></header><article class="markdown book-article"><h1 id=save-files-outside-telegram>Save Files Outside Telegram
|
||||
<a class=anchor href=#save-files-outside-telegram>#</a></h1><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/38355dfd142f0f1a819a8837875b33da0d3a81b7 title='Last modified by krau | 2026/03/11' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
|
||||
<span>2026/03/11</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/usage/parsers.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></nav></div></aside></main></body></html>
|
||||
35
en/usage/rules/index.html
Normal file
35
en/usage/rules/index.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<!doctype html><html lang=en dir=ltr><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="
|
||||
Storage Rules
|
||||
#
|
||||
|
||||
Storage rules allow you to define redirection rules when the bot uploads files to storage, so that saved files are automatically organized.
|
||||
See: #28
|
||||
Currently supported rule types:
|
||||
|
||||
FILENAME-REGEX
|
||||
MESSAGE-REGEX
|
||||
IS-ALBUM
|
||||
|
||||
Basic syntax for adding rules:
|
||||
“RuleType RuleContent StorageName Path”
|
||||
Pay attention to spaces; the bot can only parse correctly formatted syntax. Below is an example of a valid rule command:
|
||||
/rule add FILENAME-REGEX (?i)\.(mp4|mkv|ts|avi|flv)$ MyAlist /videos
|
||||
In addition, if CHOSEN is used as the storage name in the rule, it means files will be stored under the path of the storage you selected by clicking the inline button."><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/usage/rules/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="Storage Rules"><meta property="og:description" content="Storage Rules # Storage rules allow you to define redirection rules when the bot uploads files to storage, so that saved files are automatically organized.
|
||||
See: #28
|
||||
Currently supported rule types:
|
||||
FILENAME-REGEX MESSAGE-REGEX IS-ALBUM Basic syntax for adding rules:
|
||||
“RuleType RuleContent StorageName Path”
|
||||
Pay attention to spaces; the bot can only parse correctly formatted syntax. Below is an example of a valid rule command:
|
||||
/rule add FILENAME-REGEX (?i)\.(mp4|mkv|ts|avi|flv)$ MyAlist /videos In addition, if CHOSEN is used as the storage name in the rule, it means files will be stored under the path of the storage you selected by clicking the inline button."><meta property="og:locale" content="en"><meta property="og:type" content="article"><meta property="article:section" content="usage"><meta property="article:modified_time" content="2026-03-11T19:37:25+08:00"><title>Storage Rules | 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/rules/><link rel=alternate hreflang=zh href=https://sabot.unv.app/usage/rules/ title=存储规则><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous></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/rules/>简体中文</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><li><a href=/en/usage/silent/>Silent Mode</a></li><li><a href=/en/usage/rules/ class=active>Storage Rules</a></li><li><a href=/en/usage/watch/>Watch Chats</a></li><li><a href=/en/usage/directlinks/>Direct Download Links</a></li><li><a href=/en/usage/aria2/>Aria2 Download</a></li><li><a href=/en/usage/ytdlp/>yt-dlp Video Download</a></li><li><a href=/en/usage/transfer/>Storage Transfer</a></li><li><a href=/en/usage/parsers/>Save Files Outside Telegram</a></li><li><a href=/en/usage/api/>HTTP API</a></li></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>Storage Rules</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=#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></nav></aside></header><article class="markdown book-article"><h1 id=storage-rules>Storage Rules
|
||||
<a class=anchor href=#storage-rules>#</a></h1><p>Storage rules allow you to define redirection rules when the bot uploads files to storage, so that saved files are automatically organized.</p><p>See: <a href=https://github.com/krau/SaveAny-Bot/issues/28 target=_blank>#28</a></p><p>Currently supported rule types:</p><ol><li>FILENAME-REGEX</li><li>MESSAGE-REGEX</li><li>IS-ALBUM</li></ol><p>Basic syntax for adding rules:</p><p>“RuleType RuleContent StorageName Path”</p><p>Pay attention to spaces; the bot can only parse correctly formatted syntax. Below is an example of a valid rule command:</p><pre tabindex=0><code>/rule add FILENAME-REGEX (?i)\.(mp4|mkv|ts|avi|flv)$ MyAlist /videos
|
||||
</code></pre><p>In addition, if <code>CHOSEN</code> is used as the storage name in the rule, it means files will be stored under the path of the storage you selected by clicking the inline button.</p><p>Rule types:</p><h2 id=filename-regex>FILENAME-REGEX
|
||||
<a class=anchor href=#filename-regex>#</a></h2><p>Matches based on filename regex. The rule content must be a valid regular expression, such as:</p><pre tabindex=0><code>FILENAME-REGEX (?i)\.(mp4|mkv|ts|avi|flv)$ MyAlist /videos
|
||||
</code></pre><p>This means files with extensions mp4, mkv, ts, avi, flv will be saved to the <code>/videos</code> directory in the storage named <code>MyAlist</code> (also affected by the <code>base_path</code> in the configuration file).</p><h2 id=message-regex>MESSAGE-REGEX
|
||||
<a class=anchor href=#message-regex>#</a></h2><p>Similar to the above, but matches based on the text content of the message itself.</p><h2 id=is-album>IS-ALBUM
|
||||
<a class=anchor href=#is-album>#</a></h2><p>Matches album messages (media groups). Rule content can only be <code>true</code> or <code>false</code>.</p><p>If the path in the rule uses <code>NEW-FOR-ALBUM</code>, the bot will create a new folder for each media group and store all files of that group there. See: <a href=https://github.com/krau/SaveAny-Bot/issues/87>https://github.com/krau/SaveAny-Bot/issues/87</a></p><p>For example:</p><pre tabindex=0><code>IS-ALBUM true MyWebdav NEW-FOR-ALBUM
|
||||
</code></pre><p>This will save media-group messages to the storage named <code>MyWebdav</code>, creating a new folder (generated from the first file) for each album.</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/38355dfd142f0f1a819a8837875b33da0d3a81b7 title='Last modified by krau | 2026/03/11' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
|
||||
<span>2026/03/11</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/usage/rules.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=#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></nav></div></aside></main></body></html>
|
||||
17
en/usage/silent/index.html
Normal file
17
en/usage/silent/index.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!doctype html><html lang=en dir=ltr><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="
|
||||
Silent Mode (silent)
|
||||
#
|
||||
|
||||
Use the /silent command to toggle silent mode.
|
||||
By default, silent mode is off, and the bot will ask you for the save location of each file.
|
||||
When silent mode is enabled, the bot will save files directly to the default location without confirmation.
|
||||
Before enabling silent mode, you need to set the default save location using the /storage command."><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/usage/silent/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="Silent Mode"><meta property="og:description" content="Silent Mode (silent) # Use the /silent command to toggle silent mode.
|
||||
By default, silent mode is off, and the bot will ask you for the save location of each file.
|
||||
When silent mode is enabled, the bot will save files directly to the default location without confirmation.
|
||||
Before enabling silent mode, you need to set the default save location using the /storage command."><meta property="og:locale" content="en"><meta property="og:type" content="article"><meta property="article:section" content="usage"><meta property="article:modified_time" content="2026-03-11T19:37:25+08:00"><title>Silent Mode | 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/silent/><link rel=alternate hreflang=zh href=https://sabot.unv.app/usage/silent/ title=静默模式><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous></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/silent/>简体中文</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><li><a href=/en/usage/silent/ class=active>Silent Mode</a></li><li><a href=/en/usage/rules/>Storage Rules</a></li><li><a href=/en/usage/watch/>Watch Chats</a></li><li><a href=/en/usage/directlinks/>Direct Download Links</a></li><li><a href=/en/usage/aria2/>Aria2 Download</a></li><li><a href=/en/usage/ytdlp/>yt-dlp Video Download</a></li><li><a href=/en/usage/transfer/>Storage Transfer</a></li><li><a href=/en/usage/parsers/>Save Files Outside Telegram</a></li><li><a href=/en/usage/api/>HTTP API</a></li></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>Silent Mode</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></nav></aside></header><article class="markdown book-article"><h1 id=silent-mode-silent>Silent Mode (silent)
|
||||
<a class=anchor href=#silent-mode-silent>#</a></h1><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></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/38355dfd142f0f1a819a8837875b33da0d3a81b7 title='Last modified by krau | 2026/03/11' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
|
||||
<span>2026/03/11</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/usage/silent.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></nav></div></aside></main></body></html>
|
||||
46
en/usage/transfer/index.html
Normal file
46
en/usage/transfer/index.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<!doctype html><html lang=en dir=ltr><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content='
|
||||
Storage Transfer
|
||||
#
|
||||
|
||||
Use the /transfer command to transfer files directly between different storages without going through Telegram.
|
||||
/transfer <source_storage>:/<source_path> [filter]
|
||||
Parameters:
|
||||
|
||||
source_storage: Source storage name
|
||||
source_path: Source path
|
||||
filter: Optional regex filter to transfer only matching files
|
||||
|
||||
Examples:
|
||||
# Transfer entire directory
|
||||
/transfer local1:/downloads
|
||||
|
||||
# Transfer files from specified path
|
||||
/transfer alist1:/media/photos
|
||||
|
||||
# Transfer only mp4 files
|
||||
/transfer webdav1:/videos ".*\.mp4$"
|
||||
|
||||
# Transfer image files
|
||||
/transfer local1:/pictures "(?i)\.(jpg|png|gif)$"
|
||||
The bot will:'><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/usage/transfer/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="Storage Transfer"><meta property="og:description" content='Storage Transfer # Use the /transfer command to transfer files directly between different storages without going through Telegram.
|
||||
/transfer <source_storage>:/<source_path> [filter] Parameters:
|
||||
source_storage: Source storage name source_path: Source path filter: Optional regex filter to transfer only matching files Examples:
|
||||
# Transfer entire directory /transfer local1:/downloads # Transfer files from specified path /transfer alist1:/media/photos # Transfer only mp4 files /transfer webdav1:/videos ".*\.mp4$" # Transfer image files /transfer local1:/pictures "(?i)\.(jpg|png|gif)$" The bot will:'><meta property="og:locale" content="en"><meta property="og:type" content="article"><meta property="article:section" content="usage"><meta property="article:modified_time" content="2026-03-11T19:37:25+08:00"><title>Storage Transfer | 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/transfer/><link rel=alternate hreflang=zh href=https://sabot.unv.app/usage/transfer/ title=存储间传输><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous></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/transfer/>简体中文</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><li><a href=/en/usage/silent/>Silent Mode</a></li><li><a href=/en/usage/rules/>Storage Rules</a></li><li><a href=/en/usage/watch/>Watch Chats</a></li><li><a href=/en/usage/directlinks/>Direct Download Links</a></li><li><a href=/en/usage/aria2/>Aria2 Download</a></li><li><a href=/en/usage/ytdlp/>yt-dlp Video Download</a></li><li><a href=/en/usage/transfer/ class=active>Storage Transfer</a></li><li><a href=/en/usage/parsers/>Save Files Outside Telegram</a></li><li><a href=/en/usage/api/>HTTP API</a></li></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>Storage Transfer</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></nav></aside></header><article class="markdown book-article"><h1 id=storage-transfer>Storage Transfer
|
||||
<a class=anchor href=#storage-transfer>#</a></h1><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 <source_storage>:/<source_path> <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>".*\.mp4</span>$<span style=color:#e6db74>"</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>"(?i)\.(jpg|png|gif)</span>$<span style=color:#e6db74>"</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></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/38355dfd142f0f1a819a8837875b33da0d3a81b7 title='Last modified by krau | 2026/03/11' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
|
||||
<span>2026/03/11</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/usage/transfer.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></nav></div></aside></main></body></html>
|
||||
38
en/usage/watch/index.html
Normal file
38
en/usage/watch/index.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<!doctype html><html lang=en dir=ltr><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="
|
||||
Watch Chats
|
||||
#
|
||||
|
||||
|
||||
|
||||
This feature requires enabling UserBot integration.
|
||||
|
||||
|
||||
|
||||
You can watch messages in a specific chat and automatically save them to the default storage, following storage rules. You can also add filters so that only matching messages are saved.
|
||||
Watch a chat:
|
||||
/watch <chat_id/username> [filter]
|
||||
Stop watching:
|
||||
/unwatch <chat_id/username>
|
||||
Filter types:
|
||||
|
||||
msgre
|
||||
#
|
||||
|
||||
Regex-match the message text. For example:
|
||||
/watch 12345678 msgre:.*hello.*
|
||||
This will watch the chat with ID 12345678, and only save messages whose text contains hello."><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/usage/watch/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="Watch Chats"><meta property="og:description" content="Watch Chats # This feature requires enabling UserBot integration. You can watch messages in a specific chat and automatically save them to the default storage, following storage rules. You can also add filters so that only matching messages are saved.
|
||||
Watch a chat:
|
||||
/watch <chat_id/username> [filter] Stop watching:
|
||||
/unwatch <chat_id/username> Filter types:
|
||||
msgre # Regex-match the message text. For example:
|
||||
/watch 12345678 msgre:.*hello.* This will watch the chat with ID 12345678, and only save messages whose text contains hello."><meta property="og:locale" content="en"><meta property="og:type" content="article"><meta property="article:section" content="usage"><meta property="article:modified_time" content="2026-03-11T19:37:25+08:00"><title>Watch Chats | 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/watch/><link rel=alternate hreflang=zh href=https://sabot.unv.app/usage/watch/ title=监听聊天><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous></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/watch/>简体中文</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><li><a href=/en/usage/silent/>Silent Mode</a></li><li><a href=/en/usage/rules/>Storage Rules</a></li><li><a href=/en/usage/watch/ class=active>Watch Chats</a></li><li><a href=/en/usage/directlinks/>Direct Download Links</a></li><li><a href=/en/usage/aria2/>Aria2 Download</a></li><li><a href=/en/usage/ytdlp/>yt-dlp Video Download</a></li><li><a href=/en/usage/transfer/>Storage Transfer</a></li><li><a href=/en/usage/parsers/>Save Files Outside Telegram</a></li><li><a href=/en/usage/api/>HTTP API</a></li></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>Watch Chats</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=#msgre>msgre</a></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=watch-chats>Watch Chats
|
||||
<a class=anchor href=#watch-chats>#</a></h1><blockquote class="book-hint warning">This feature requires enabling UserBot integration.</blockquote><p>You can watch messages in a specific chat and automatically save them to the default storage, following storage rules. You can also add filters so that only matching messages are saved.</p><p>Watch a chat:</p><pre tabindex=0><code>/watch <chat_id/username> [filter]
|
||||
</code></pre><p>Stop watching:</p><pre tabindex=0><code>/unwatch <chat_id/username>
|
||||
</code></pre><p>Filter types:</p><h2 id=msgre>msgre
|
||||
<a class=anchor href=#msgre>#</a></h2><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></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/38355dfd142f0f1a819a8837875b33da0d3a81b7 title='Last modified by krau | 2026/03/11' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
|
||||
<span>2026/03/11</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/usage/watch.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=#msgre>msgre</a></li></ul></nav></div></aside></main></body></html>
|
||||
41
en/usage/ytdlp/index.html
Normal file
41
en/usage/ytdlp/index.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<!doctype html><html lang=en dir=ltr><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="
|
||||
yt-dlp Video Download
|
||||
#
|
||||
|
||||
|
||||
|
||||
This feature requires the yt-dlp command-line tool installed on your system.
|
||||
|
||||
|
||||
|
||||
Use the /ytdlp command to download videos and audio from supported video websites, including YouTube, Bilibili, Twitter, and 1000+ other sites.
|
||||
/ytdlp <url1> [url2] [flags...]
|
||||
Examples:
|
||||
# Basic download
|
||||
/ytdlp https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
||||
|
||||
# Download multiple videos
|
||||
/ytdlp https://www.youtube.com/watch?v=video1 https://www.youtube.com/watch?v=video2
|
||||
|
||||
# Use custom parameters
|
||||
/ytdlp https://www.youtube.com/watch?v=dQw4w9WgXcQ -f best
|
||||
/ytdlp https://www.youtube.com/watch?v=dQw4w9WgXcQ --extract-audio --audio-format mp3
|
||||
Common parameters:"><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/usage/ytdlp/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="yt-dlp Video Download"><meta property="og:description" content="yt-dlp Video Download # This feature requires the yt-dlp command-line tool installed on your system. Use the /ytdlp command to download videos and audio from supported video websites, including YouTube, Bilibili, Twitter, and 1000+ other sites.
|
||||
/ytdlp <url1> [url2] [flags...] Examples:
|
||||
# Basic download /ytdlp https://www.youtube.com/watch?v=dQw4w9WgXcQ # Download multiple videos /ytdlp https://www.youtube.com/watch?v=video1 https://www.youtube.com/watch?v=video2 # Use custom parameters /ytdlp https://www.youtube.com/watch?v=dQw4w9WgXcQ -f best /ytdlp https://www.youtube.com/watch?v=dQw4w9WgXcQ --extract-audio --audio-format mp3 Common parameters:"><meta property="og:locale" content="en"><meta property="og:type" content="article"><meta property="article:section" content="usage"><meta property="article:modified_time" content="2026-03-11T19:37:25+08:00"><title>yt-dlp Video Download | 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/ytdlp/><link rel=alternate hreflang=zh href=https://sabot.unv.app/usage/ytdlp/ title="yt-dlp 视频下载"><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous></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/ytdlp/>简体中文</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><li><a href=/en/usage/silent/>Silent Mode</a></li><li><a href=/en/usage/rules/>Storage Rules</a></li><li><a href=/en/usage/watch/>Watch Chats</a></li><li><a href=/en/usage/directlinks/>Direct Download Links</a></li><li><a href=/en/usage/aria2/>Aria2 Download</a></li><li><a href=/en/usage/ytdlp/ class=active>yt-dlp Video Download</a></li><li><a href=/en/usage/transfer/>Storage Transfer</a></li><li><a href=/en/usage/parsers/>Save Files Outside Telegram</a></li><li><a href=/en/usage/api/>HTTP API</a></li></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>yt-dlp Video Download</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></nav></aside></header><article class="markdown book-article"><h1 id=yt-dlp-video-download>yt-dlp Video Download
|
||||
<a class=anchor href=#yt-dlp-video-download>#</a></h1><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 <url1> <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 <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 <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></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/38355dfd142f0f1a819a8837875b33da0d3a81b7 title='Last modified by krau | 2026/03/11' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
|
||||
<span>2026/03/11</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/usage/ytdlp.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></nav></div></aside></main></body></html>
|
||||
Reference in New Issue
Block a user