mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-05-11 19:09:39 +08:00
deploy: 95f7d5abb5
This commit is contained in:
@@ -2,21 +2,35 @@
|
||||
Contributing
|
||||
#
|
||||
|
||||
Before you start, please fork this repository, clone it locally, and set up your Go development environment.
|
||||
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:
|
||||
|
||||
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
|
||||
#
|
||||
|
||||
|
||||
Fork this repository and clone it to your local machine.
|
||||
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.
|
||||
"><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/contribute/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="Contributing"><meta property="og:description" content="Contributing # Contributing New Storage Backend # Fork this repository and clone it to your local machine. 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."><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>
|
||||
|
||||
|
||||
Contributing New Parsers
|
||||
#
|
||||
|
||||
You can either implement native parsers in Go (recommended), or write JavaScript-based parser plugins."><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/contribute/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="Contributing"><meta property="og:description" content="Contributing # Before you start, please fork this repository, clone it locally, and set up your Go development environment.
|
||||
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:
|
||||
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></ul></nav></aside></header><article class="markdown book-article"><h1 id=contributing>Contributing
|
||||
<a class=anchor href=#contributing>#</a></h1><h2 id=contributing-new-storage-backend>Contributing New Storage Backend
|
||||
<a class=anchor href=#contributing-new-storage-backend>#</a></h2><ol><li>Fork this repository and clone it to your local machine.</li><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></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/contribute/_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=#contributing-new-storage-backend>Contributing New Storage Backend</a></li></ul></nav></div></aside></main></body></html>
|
||||
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
|
||||
<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>
|
||||
<span>2025/12/19</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/contribute/_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=#contributing-new-storage-backend>Contributing New Storage Backend</a></li><li><a href=#contributing-new-parsers>Contributing New Parsers</a></li></ul></nav></div></aside></main></body></html>
|
||||
@@ -9,7 +9,7 @@ SaveAnyBot needs to read a config.toml file in the working directory as its conf
|
||||
Here is an example of a minimal configuration file:"><meta property="og:locale" content="en"><meta property="og:type" content="website"><title>Configuration Guide | Save Any Bot</title><link rel=icon href=/favicon.png><link rel=manifest href=/manifest.json><link rel=canonical href=https://sabot.unv.app/en/deployment/configuration/><link rel=alternate hreflang=zh href=https://sabot.unv.app/deployment/configuration/ title=配置说明><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous><link rel=alternate type=application/rss+xml href=https://sabot.unv.app/en/deployment/configuration/index.xml title="Save Any Bot"></head><body dir=ltr><input type=checkbox class="hidden toggle" id=menu-control>
|
||||
<input type=checkbox class="hidden toggle" id=toc-control><main class="container flex"><aside class=book-menu><div class=book-menu-content><nav><h2 class=book-brand><a class="flex align-center" href=/en/><img src=/logo.png alt=Logo class=book-icon><span>Save Any Bot</span></a></h2><ul class=book-languages><li><input type=checkbox id=languages class=toggle>
|
||||
<label for=languages class=flex><a role=button class="flex flex-auto"><img src=/svg/translate.svg class=book-icon alt=Languages>
|
||||
English</a></label><ul><li><a href=/deployment/configuration/>简体中文</a></li></ul></li></ul><ul><li><a href=https://github.com/krau/SaveAny-Bot target=_blank rel=noopener>🔗 GitHub</a></li></ul><ul><li><span>Deployment Guide</span><ul><li><a href=/en/deployment/configuration/ class=active>Configuration Guide</a><ul><li><a href=/en/deployment/configuration/storages/>Storage Configuration</a></li></ul></li><li><a href=/en/deployment/installation/>Installation and Updates</a></li></ul></li><li><a href=/en/usage/>Usage</a><ul></ul></li><li><a href=/en/help/>Frequently Asked Questions</a><ul></ul></li><li><a href=/en/contribute/>Contributing</a><ul></ul></li></ul></nav><script>(function(){var e=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script></div></aside><div class=book-page><header class=book-header><div class="flex align-center justify-between"><label for=menu-control><img src=/svg/menu.svg class=book-icon alt=Menu></label><h3>Configuration Guide</h3><label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav id=TableOfContents><ul><li><a href=#detailed-configuration>Detailed Configuration</a><ul><li><a href=#global-configuration>Global Configuration</a></li><li><a href=#telegram-configuration>Telegram Configuration</a></li><li><a href=#storage-endpoints-list>Storage Endpoints List</a></li><li><a href=#user-list>User List</a></li><li><a href=#miscellaneous>Miscellaneous</a></li></ul></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=configuration-guide>Configuration Guide
|
||||
English</a></label><ul><li><a href=/deployment/configuration/>简体中文</a></li></ul></li></ul><ul><li><a href=https://github.com/krau/SaveAny-Bot target=_blank rel=noopener>🔗 GitHub</a></li></ul><ul><li><span>Deployment Guide</span><ul><li><a href=/en/deployment/configuration/ class=active>Configuration Guide</a><ul><li><a href=/en/deployment/configuration/storages/>Storage Configuration</a></li></ul></li><li><a href=/en/deployment/installation/>Installation and Updates</a></li></ul></li><li><a href=/en/usage/>Usage</a><ul></ul></li><li><a href=/en/help/>Frequently Asked Questions</a><ul></ul></li><li><a href=/en/contribute/>Contributing</a><ul></ul></li></ul></nav><script>(function(){var e=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script></div></aside><div class=book-page><header class=book-header><div class="flex align-center justify-between"><label for=menu-control><img src=/svg/menu.svg class=book-icon alt=Menu></label><h3>Configuration Guide</h3><label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav id=TableOfContents><ul><li><a href=#detailed-configuration>Detailed Configuration</a><ul><li><a href=#global-configuration>Global Configuration</a></li><li><a href=#telegram-configuration>Telegram Configuration</a></li><li><a href=#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>
|
||||
@@ -25,8 +25,13 @@ English</a></label><ul><li><a href=/deployment/configuration/>简体中文</a></
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>base_path</span> = <span style=color:#e6db74>"./downloads"</span>
|
||||
</span></span></code></pre></div><h2 id=detailed-configuration>Detailed Configuration
|
||||
<a class=anchor href=#detailed-configuration>#</a></h2><h3 id=global-configuration>Global Configuration
|
||||
<a class=anchor href=#global-configuration>#</a></h3><ul><li><code>stream</code>: Whether to enable Stream mode, default is <code>false</code>. When enabled, the Bot will stream files directly to storage endpoints (if supported), without downloading them locally.<blockquote class="book-hint warning">Stream mode is very useful for deployment environments with limited disk space, but it also has some drawbacks:<br><ul><li>Cannot use multi-threading to download files from Telegram, resulting in slower speeds.</li><li>Higher task failure rate when the network is unstable.</li><li>Cannot process files in the middle layer, such as automatic file type identification.</li><li>Not supported by all storage endpoints; unsupported endpoints may downgrade to normal mode or fail to upload.</li></ul></blockquote></li><li><code>workers</code>: Number of tasks to process simultaneously, default is 3.</li><li><code>threads</code>: Number of threads used when downloading files, default is 4. Only effective when Stream mode is not enabled.</li><li><code>retry</code>: Number of retries when a task fails, default is 3.</li></ul><h3 id=telegram-configuration>Telegram Configuration
|
||||
<a class=anchor href=#telegram-configuration>#</a></h3><ul><li><code>token</code>: Your Telegram Bot Token, which can be obtained by creating a Bot through <a href=https://t.me/botfather>BotFather</a>.</li><li><code>app_id</code>, <code>app_hash</code>: Telegram API ID & Hash, obtained by creating an application at <a href=https://my.telegram.org/apps>Telegram API</a>. Default values will be used if not provided.</li><li><code>flood_retry</code>: Number of retries for flood control, default is 5.</li><li><code>rpc_retry</code>: Number of retries for RPC requests, default is 5.</li><li><code>proxy</code>: Proxy configuration, optional.<ul><li><code>enable</code>: Whether to enable the proxy.</li><li><code>url</code>: Proxy address, only supports <code>socks5://</code></li></ul></li></ul><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>]
|
||||
<a class=anchor href=#global-configuration>#</a></h3><ul><li><code>stream</code>: Whether to enable Stream mode, default is <code>false</code>. When enabled, the Bot will stream files directly to storage endpoints (if supported), without downloading them locally.<blockquote class="book-hint warning">Stream mode is very useful for deployment environments with limited disk space, but it also has some drawbacks:<br><ul><li>Cannot use multi-threading to download files from Telegram, resulting in slower speeds.</li><li>Higher task failure rate when the network is unstable.</li><li>Cannot process files in the middle layer, such as automatic file type identification.</li><li>Not supported by all storage endpoints; unsupported endpoints may downgrade to normal mode or fail to upload.</li></ul></blockquote></li><li><code>workers</code>: Number of tasks to process simultaneously, default is 3.</li><li><code>threads</code>: Number of threads used when downloading files, default is 4. Only effective when Stream mode is not enabled.</li><li><code>retry</code>: Number of retries when a task fails, default is 3.</li><li><code>proxy</code>: Global proxy configuration. After setting this, all network connections inside the program will try to use this proxy. Optional.</li></ul><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>stream</span> = <span style=color:#66d9ef>false</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>workers</span> = <span style=color:#ae81ff>3</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>threads</span> = <span style=color:#ae81ff>4</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>retry</span> = <span style=color:#ae81ff>3</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>proxy</span> = <span style=color:#e6db74>"socks5://127.0.0.1:7890"</span>
|
||||
</span></span></code></pre></div><h3 id=telegram-configuration>Telegram Configuration
|
||||
<a class=anchor href=#telegram-configuration>#</a></h3><ul><li><code>token</code>: Your Telegram Bot Token, which can be obtained by creating a Bot through <a href=https://t.me/botfather>BotFather</a>.</li><li><code>app_id</code>, <code>app_hash</code>: Telegram API ID & Hash, obtained by creating an application at <a href=https://my.telegram.org/apps>Telegram API</a>. Default values will be used if not provided.</li><li><code>flood_retry</code>: Number of retries for flood control, default is 5.</li><li><code>rpc_retry</code>: Number of retries for RPC requests, default is 5.</li><li><code>proxy</code>: Proxy configuration, optional.<ul><li><code>enable</code>: Whether to enable the proxy.</li><li><code>url</code>: Proxy address, only supports <code>socks5://</code></li></ul></li><li><code>userbot</code>: Userbot configuration, optional.<ul><li><code>enable</code>: Enable userbot integration. Requires logging in with a user account; you should use your own API ID & Hash when enabling this.</li><li><code>session</code>: Path to the userbot session file, default is <code>data/usersession.db</code>.</li></ul></li></ul><blockquote class="book-hint warning">After enabling userbot integration, the bot can download files from private channels and groups, but there is an unavoidable risk of the account being banned.<br>On the first start after enabling userbot, you need to input phone number, 2FA and verification code in the terminal.<br>If you deploy with Docker, please run the container with `-it` for an interactive environment, then perform the login.</blockquote><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-toml data-lang=toml><span style=display:flex><span>[<span style=color:#a6e22e>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><span style=color:#a6e22e>app_id</span> = <span style=color:#ae81ff>1025907</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>app_hash</span> = <span style=color:#e6db74>"452b0359b988148995f22ff0f4229750"</span>
|
||||
@@ -35,6 +40,9 @@ English</a></label><ul><li><a href=/deployment/configuration/>简体中文</a></
|
||||
</span></span><span style=display:flex><span>[<span style=color:#a6e22e>telegram</span>.<span style=color:#a6e22e>proxy</span>]
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>enable</span> = <span style=color:#66d9ef>false</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>url</span> = <span style=color:#e6db74>"socks5://127.0.0.1:7890"</span>
|
||||
</span></span><span style=display:flex><span>[<span style=color:#a6e22e>telegram</span>.<span style=color:#a6e22e>userbot</span>]
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>enable</span> = <span style=color:#66d9ef>false</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>session</span> = <span style=color:#e6db74>"data/usersession.db"</span>
|
||||
</span></span></code></pre></div><h3 id=storage-endpoints-list>Storage Endpoints List
|
||||
<a class=anchor href=#storage-endpoints-list>#</a></h3><p>The storage endpoints list is used to define the storage locations supported by the Bot. Each storage endpoint needs to specify a name, type, and related configuration, using the double bracket syntax <code>[[storages]]</code>.</p><p>Each storage endpoint requires at least the following fields:</p><ul><li><code>name</code>: Storage endpoint name, used for identification in the Bot, must be unique.</li><li><code>enable</code>: Whether to enable this storage endpoint, default is <code>true</code>.</li><li><code>type</code>: Storage endpoint type, currently supports the following types:<ul><li><code>local</code>: Local disk</li><li><code>alist</code>: Alist</li><li><code>webdav</code>: WebDAV</li><li><code>s3</code>: aws S3 and other S3 compatible services</li><li><code>telegram</code>: Upload to Telegram</li></ul></li></ul><p>Example, this is a configuration that includes local storage and webdav storage:</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-toml data-lang=toml><span style=display:flex><span>[[<span style=color:#a6e22e>storages</span>]]
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>name</span> = <span style=color:#e6db74>"Local Storage"</span>
|
||||
@@ -66,11 +74,21 @@ English</a></label><ul><li><a href=/deployment/configuration/>简体中文</a></
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>id</span> = <span style=color:#ae81ff>789789</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>storages</span> = []
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>blacklist</span> = <span style=color:#66d9ef>true</span>
|
||||
</span></span></code></pre></div><h3 id=miscellaneous>Miscellaneous
|
||||
</span></span></code></pre></div><h3 id=events>Events
|
||||
<a class=anchor href=#events>#</a></h3><p>Event hooks allow you to run custom commands based on task status while the bot is processing tasks. Currently only arbitrary command execution is supported, configured via <code>[hook.exec]</code>.</p><p>Supported event types:</p><ul><li><code>task_before_start</code>: Before a task starts</li><li><code>task_success</code>: After a task completes successfully</li><li><code>task_fail</code>: After a task fails</li><li><code>task_cancel</code>: After a task is cancelled</li></ul><p>The configured value must be a full shell command line. The bot will execute this command when the event occurs. Example:</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>hook</span>.<span style=color:#a6e22e>exec</span>]
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>task_before_start</span> = <span style=color:#e6db74>"echo 'task is about to start'"</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>task_success</span> = <span style=color:#e6db74>"bash /path/to/success_script.sh"</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>task_fail</span> = <span style=color:#e6db74>"curl -X POST https://example.com/api/notify -d 'task failed'"</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>task_cancel</span> = <span style=color:#e6db74>"bash /path/to/cancel_script.sh"</span>
|
||||
</span></span></code></pre></div><h3 id=parsers>Parsers
|
||||
<a class=anchor href=#parsers>#</a></h3><p>Parsers give the bot the ability to handle non-Telegram files, such as downloading files from other websites. Configure them via <code>[parsers]</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>parsers</span>]
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>plugin_enable</span> = <span style=color:#66d9ef>true</span> <span style=color:#75715e># Whether to enable parser plugins</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>plugin_dirs</span> = [<span style=color:#e6db74>"./plugins"</span>] <span style=color:#75715e># Plugin directories, can be multiple</span>
|
||||
</span></span></code></pre></div><p>The above settings only control JavaScript-based parser plugins. The bot also has built-in parsers implemented in Go, which are enabled by default.</p><h3 id=miscellaneous>Miscellaneous
|
||||
<a class=anchor href=#miscellaneous>#</a></h3><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>no_clean_cache</span> = <span style=color:#66d9ef>false</span> <span style=color:#75715e># Whether not to clear the cache folder when exiting</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#75715e># Temporary download folder configuration</span>
|
||||
</span></span><span style=display:flex><span>[<span style=color:#a6e22e>temp</span>]
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>base_path</span> = <span style=color:#e6db74>"./cache"</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/91814a83c76b67ea1abb4e66b12537374f56c556 title='Last modified by krau | 2025/12/04' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
|
||||
<span>2025/12/04</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/deployment/configuration/_index.md target=_blank rel=noopener><img src=/svg/edit.svg class=book-icon alt>
|
||||
<span>Edit this page</span></a></div></div><script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script></footer><div class=book-comments></div><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav id=TableOfContents><ul><li><a href=#detailed-configuration>Detailed Configuration</a><ul><li><a href=#global-configuration>Global Configuration</a></li><li><a href=#telegram-configuration>Telegram Configuration</a></li><li><a href=#storage-endpoints-list>Storage Endpoints List</a></li><li><a href=#user-list>User List</a></li><li><a href=#miscellaneous>Miscellaneous</a></li></ul></li></ul></nav></div></aside></main></body></html>
|
||||
</span></span></code></pre></div></article><footer class=book-footer><div class="flex flex-wrap justify-between"><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/commit/95f7d5abb5f63536b1ff008f95689cce69ce4253 title='Last modified by krau | 2025/12/19' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
|
||||
<span>2025/12/19</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/deployment/configuration/_index.md target=_blank rel=noopener><img src=/svg/edit.svg class=book-icon alt>
|
||||
<span>Edit this page</span></a></div></div><script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script></footer><div class=book-comments></div><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav id=TableOfContents><ul><li><a href=#detailed-configuration>Detailed Configuration</a><ul><li><a href=#global-configuration>Global Configuration</a></li><li><a href=#telegram-configuration>Telegram Configuration</a></li><li><a href=#storage-endpoints-list>Storage Endpoints List</a></li><li><a href=#user-list>User List</a></li><li><a href=#events>Events</a></li><li><a href=#parsers>Parsers</a></li><li><a href=#miscellaneous>Miscellaneous</a></li></ul></li></ul></nav></div></aside></main></body></html>
|
||||
@@ -24,7 +24,7 @@ token = "your_token"
|
||||
type=local'><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/configuration/storages/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="Storage Configuration"><meta property="og:description" content='Storage Configuration # Please first read the Configuration Guide to understand the basic format of the configuration file.
|
||||
Alist # type=alist
|
||||
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="2025-12-04T22:59:23+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>
|
||||
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="2025-12-19T21:03:58+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></ul></nav></aside></header><article class="markdown book-article"><h1 id=storage-configuration>Storage Configuration
|
||||
@@ -45,15 +45,20 @@ English</a></label><ul><li><a href=/deployment/configuration/storages/>简体中
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>password</span> = <span style=color:#e6db74>"your_password"</span> <span style=color:#75715e># Password for WebDAV</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>base_path</span> = <span style=color:#e6db74>"/path/to/webdav"</span> <span style=color:#75715e># Base path in WebDAV, all files will be stored under this path</span>
|
||||
</span></span></code></pre></div><h2 id=s3>S3
|
||||
<a class=anchor href=#s3>#</a></h2><p><code>type=s3</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>endpoint</span> = <span style=color:#e6db74>"s3.example.com"</span> <span style=color:#75715e># Endpoint for S3</span>
|
||||
<a class=anchor href=#s3>#</a></h2><p><code>type=s3</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>endpoint</span> = <span style=color:#e6db74>"s3.example.com"</span> <span style=color:#75715e># Endpoint for S3, defaults to AWS S3 endpoint if not set</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>region</span> = <span style=color:#e6db74>"us-east-1"</span> <span style=color:#75715e># Region for S3</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>access_key_id</span> = <span style=color:#e6db74>"your_access_key_id"</span> <span style=color:#75715e># Access key ID for S3</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>secret_access_key</span> = <span style=color:#e6db74>"your_secret_access_key"</span> <span style=color:#75715e># Secret access key for S3</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>bucket_name</span> = <span style=color:#e6db74>"your_bucket_name"</span> <span style=color:#75715e># Bucket name for S3</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>use_ssl</span> = <span style=color:#66d9ef>true</span> <span style=color:#75715e># Whether to use SSL, default is true</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>base_path</span> = <span style=color:#e6db74>"/path/to/s3"</span> <span style=color:#75715e># Base path in S3, all files will be stored under this path</span>
|
||||
</span></span></code></pre></div><h2 id=telegram>Telegram
|
||||
<a class=anchor href=#telegram>#</a></h2><p><code>type=telegram</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>chat_id</span> = <span style=color:#e6db74>"123456789"</span> <span style=color:#75715e># Telegram chat ID, the Bot will send files to this chat</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/91814a83c76b67ea1abb4e66b12537374f56c556 title='Last modified by krau | 2025/12/04' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
|
||||
<span>2025/12/04</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/deployment/configuration/storages.md target=_blank rel=noopener><img src=/svg/edit.svg class=book-icon alt>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>virtual_host</span> = <span style=color:#66d9ef>false</span> <span style=color:#75715e># Use virtual-host style URL, default is false</span>
|
||||
</span></span></code></pre></div><p>Example of virtual-host-style URL:</p><pre tabindex=0><code>https://your_bucket_name.s3.example.com/path/to/s3/your_file
|
||||
</code></pre><p>Example of path-style URL (when <code>virtual_host</code> is false):</p><pre tabindex=0><code>https://s3.example.com/your_bucket_name/path/to/s3/your_file
|
||||
</code></pre><p>If you are using a third-party S3-compatible service, it usually uses path-style URLs. AWS S3 typically uses virtual-host-style URLs. Please refer to your S3-compatible service documentation for details.</p><h2 id=telegram>Telegram
|
||||
<a class=anchor href=#telegram>#</a></h2><p><code>type=telegram</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>chat_id</span> = <span style=color:#e6db74>"123456789"</span> <span style=color:#75715e># Telegram chat ID, the bot will send files to this chat</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>force_file</span> = <span style=color:#66d9ef>false</span> <span style=color:#75715e># Force sending as file, default is false</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>skip_large</span> = <span style=color:#66d9ef>false</span> <span style=color:#75715e># Skip large files, default is false. If enabled, files exceeding Telegram's limit will not be uploaded.</span>
|
||||
</span></span><span style=display:flex><span><span style=color:#a6e22e>spilt_size_mb</span> = <span style=color:#ae81ff>2000</span> <span style=color:#75715e># Split size in MB, default is 2000 MB (2 GB). Files larger than this will be split into multiple parts (zip format). Ignored when skip_large is true.</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/95f7d5abb5f63536b1ff008f95689cce69ce4253 title='Last modified by krau | 2025/12/19' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
|
||||
<span>2025/12/19</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/deployment/configuration/storages.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=#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></ul></nav></div></aside></main></body></html>
|
||||
@@ -2,9 +2,9 @@
|
||||
Installation and Updates
|
||||
<a class="anchor" href="#installation-and-updates">#</a>
|
||||
</h1>
|
||||
<h2 id="deploy-from-pre-compiled-files">
|
||||
Deploy from Pre-compiled Files
|
||||
<a class="anchor" href="#deploy-from-pre-compiled-files">#</a>
|
||||
<h2 id="deploy-from-pre-compiled-files-recommended">
|
||||
Deploy from Pre-compiled Files (Recommended)
|
||||
<a class="anchor" href="#deploy-from-pre-compiled-files-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>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
|
||||
Deploy from Pre-compiled Files
|
||||
Deploy from Pre-compiled Files (Recommended)
|
||||
#
|
||||
|
||||
Download the binary file for your platform from the Release page.
|
||||
@@ -108,15 +108,15 @@ Usage: sudo sabot start|stop|restart|status|enable|disable
|
||||
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 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/installation/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="Installation and Updates"><meta property="og:description" content="Installation and Updates # Deploy from Pre-compiled Files # Download the binary file for your platform from the Release page.
|
||||
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 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/installation/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="Installation and Updates"><meta property="og:description" content="Installation and Updates # Deploy from Pre-compiled Files (Recommended) # Download the binary file for your platform from the Release page.
|
||||
Create a config.toml file in the extracted directory, refer to the Configuration Guide to edit the configuration file.
|
||||
Run:
|
||||
chmod +x saveany-bot ./saveany-bot Process Monitoring # 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="2025-08-24T14:47:13+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>
|
||||
chmod +x saveany-bot ./saveany-bot Process Monitoring # 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="2025-12-19T21:03:58+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-files>Deploy from Pre-compiled Files</a><ul><li><a href=#process-monitoring>Process Monitoring</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-files>Deploy from Pre-compiled Files
|
||||
<a class=anchor href=#deploy-from-pre-compiled-files>#</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
|
||||
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-files-recommended>Deploy from Pre-compiled Files (Recommended)</a><ul><li><a href=#process-monitoring>Process Monitoring</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-files-recommended>Deploy from Pre-compiled Files (Recommended)
|
||||
<a class=anchor href=#deploy-from-pre-compiled-files-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
|
||||
</span></span></code></pre></div><h3 id=process-monitoring>Process Monitoring
|
||||
<a class=anchor href=#process-monitoring>#</a></h3><div class=book-tabs><input type=radio class=toggle name=tabs-daemon id=tabs-daemon-0 checked>
|
||||
@@ -163,10 +163,12 @@ Then set permissions:<pre><code class=language-text>chmod +x /usr/bin/sabot<
|
||||
</span></span></span><span style=display:flex><span><span style=color:#ae81ff></span> -v /path/to/config.toml:/app/config.toml <span style=color:#ae81ff>\
|
||||
</span></span></span><span style=display:flex><span><span style=color:#ae81ff></span> -v /path/to/downloads:/app/downloads <span style=color:#ae81ff>\
|
||||
</span></span></span><span style=display:flex><span><span style=color:#ae81ff></span> ghcr.io/krau/saveany-bot:latest
|
||||
</span></span></code></pre></div><h2 id=updates>Updates
|
||||
<a class=anchor href=#updates>#</a></h2><p>Use <code>upgrade</code> or <code>up</code> to upgrade to the latest version</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>./saveany-bot upgrade
|
||||
</span></span></code></pre></div><p>If you deployed with Docker, use the following commands to update:</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>docker pull ghcr.io/krau/saveany-bot:latest
|
||||
</span></span></code></pre></div><blockquote class="book-hint info">About Docker image variants<br><ul><li>Default: Includes all features and dependencies, larger in size. Use this if you don't have special requirements.</li><li>micro: Slimmed-down image with some optional dependencies removed, smaller in size.</li><li>pico: Minimal image containing only core features, smallest in size.</li></ul>You can pull different variants by specifying tags, for example: <code>ghcr.io/krau/saveany-bot:micro</code><br>For more details about the variants, see the Dockerfile in the project root.</blockquote><h2 id=updates>Updates
|
||||
<a class=anchor href=#updates>#</a></h2><p>If you deployed from pre-compiled binaries, use the following CLI command to update:</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>./saveany-bot up
|
||||
</span></span></code></pre></div><p>(<code>upgrade</code> is also available as an alias.)</p><p>If you deployed with Docker, use the following commands to update:</p><p>docker:</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>docker pull ghcr.io/krau/saveany-bot:latest
|
||||
</span></span><span style=display:flex><span>docker restart saveany-bot
|
||||
</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/a4b3b459a978518354d58eea5f91bd509a843c3e title='Last modified by krau | 2025/08/24' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
|
||||
<span>2025/08/24</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/deployment/installation.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=#deploy-from-pre-compiled-files>Deploy from Pre-compiled Files</a><ul><li><a href=#process-monitoring>Process Monitoring</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></div></aside></main></body></html>
|
||||
</span></span></code></pre></div><p>docker compose:</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>docker compose pull
|
||||
</span></span><span style=display:flex><span>docker compose restart
|
||||
</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/95f7d5abb5f63536b1ff008f95689cce69ce4253 title='Last modified by krau | 2025/12/19' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
|
||||
<span>2025/12/19</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/deployment/installation.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=#deploy-from-pre-compiled-files-recommended>Deploy from Pre-compiled Files (Recommended)</a><ul><li><a href=#process-monitoring>Process Monitoring</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></div></aside></main></body></html>
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
Save Any Bot is a tool that allows you to save files from Telegram to various storage backends.
|
||||
|
||||
Features
|
||||
🎯 Features
|
||||
#
|
||||
|
||||
|
||||
@@ -18,13 +18,15 @@ Batch download
|
||||
Streaming
|
||||
Multi-user
|
||||
Automatic organization based on storage rules
|
||||
Watch specific chats and automatically save messages, with filters
|
||||
Write JS parser plugins to save files from almost any website
|
||||
Supports multiple storage backends:
|
||||
|
||||
Alist
|
||||
S3
|
||||
WebDAV
|
||||
Telegram (re-upload to specified chat)
|
||||
Local disk
|
||||
Telegram (re-upload to specified chat)
|
||||
|
||||
|
||||
|
||||
@@ -33,15 +35,15 @@ Local disk
|
||||
#
|
||||
|
||||
"><meta name=theme-color media="(prefers-color-scheme: light)" content="#ffffff"><meta name=theme-color media="(prefers-color-scheme: dark)" content="#343a40"><meta name=color-scheme content="light dark"><meta property="og:url" content="https://sabot.unv.app/en/"><meta property="og:site_name" content="Save Any Bot"><meta property="og:title" content="Introduction"><meta property="og:description" content="Save Any Bot # Save Any Bot is a tool that allows you to save files from Telegram to various storage backends.
|
||||
Features # Supports documents/videos/images/stickers… and even Telegraph Breaks restrictions on saving files Batch download Streaming Multi-user Automatic organization based on storage rules Supports multiple storage backends: Alist S3 WebDAV Telegram (re-upload to specified chat) Local disk Contributors #"><meta property="og:locale" content="en"><meta property="og:type" content="website"><title>Introduction | Save Any Bot</title><link rel=icon href=/favicon.png><link rel=manifest href=/manifest.json><link rel=canonical href=https://sabot.unv.app/en/><link rel=alternate hreflang=zh href=https://sabot.unv.app/ title=介绍><link rel=stylesheet href=/book.min.a22f4c7d8c2bdc5e3d6e34ba11cb59ab50ea5772594e71305bfd5a595dc78b7e.css integrity="sha256-oi9MfYwr3F49bjS6EctZq1DqV3JZTnEwW/1aWV3Hi34=" crossorigin=anonymous><link rel=alternate type=application/rss+xml href=https://sabot.unv.app/en/index.xml title="Save Any Bot"></head><body dir=ltr><input type=checkbox class="hidden toggle" id=menu-control>
|
||||
🎯 Features # Supports documents/videos/images/stickers… and even Telegraph Breaks restrictions on saving files Batch download Streaming Multi-user Automatic organization based on storage rules Watch specific chats and automatically save messages, with filters 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></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>
|
||||
<img src="https://img.shields.io/github/downloads/krau/SaveAny-Bot/total?style=flat-square" alt></p><p>Save Any Bot is a tool that allows you to save files from Telegram to various storage backends.</p><h2 id=features>Features
|
||||
<a class=anchor href=#features>#</a></h2><ul><li>Supports documents/videos/images/stickers… and even Telegraph</li><li>Breaks restrictions on saving files</li><li>Batch download</li><li>Streaming</li><li>Multi-user</li><li>Automatic organization based on storage rules</li><li>Supports multiple storage backends:<ul><li>Alist</li><li>S3</li><li>WebDAV</li><li>Telegram (re-upload to specified chat)</li><li>Local disk</li></ul></li></ul><h2 id=contributors><a href=https://github.com/krau/SaveAny-Bot/graphs/contributors>Contributors</a>
|
||||
<a class=anchor href=#contributors>#</a></h2><p><img src="https://contrib.rocks/image?repo=krau/SaveAny-Bot&max=750&columns=20" alt=Contributors></p></article><footer class=book-footer><div class="flex flex-wrap justify-between"><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/commit/91814a83c76b67ea1abb4e66b12537374f56c556 title='Last modified by krau | 2025/12/04' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
|
||||
<span>2025/12/04</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/_index.md target=_blank rel=noopener><img src=/svg/edit.svg class=book-icon alt>
|
||||
<span>Edit this page</span></a></div></div><script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script></footer><div class=book-comments></div><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav id=TableOfContents><ul><li><a href=#features>Features</a></li><li><a href=#contributors><a href=https://github.com/krau/SaveAny-Bot/graphs/contributors>Contributors</a></a></li></ul></nav></div></aside></main></body></html>
|
||||
<img src="https://img.shields.io/github/downloads/krau/SaveAny-Bot/total?style=flat-square" alt></p><p>Save Any Bot is a tool that allows you to save files from Telegram to various storage backends.</p><h2 id=-features>🎯 Features
|
||||
<a class=anchor href=#-features>#</a></h2><ul><li>Supports documents/videos/images/stickers… and even <a href=https://telegra.ph/>Telegraph</a></li><li>Breaks restrictions on saving files</li><li>Batch download</li><li>Streaming</li><li>Multi-user</li><li>Automatic organization based on storage rules</li><li>Watch specific chats and automatically save messages, with filters</li><li>Write JS parser plugins to save files from almost any website</li><li>Supports multiple storage backends:<ul><li>Alist</li><li>S3</li><li>WebDAV</li><li>Local disk</li><li>Telegram (re-upload to specified chat)</li></ul></li></ul><h2 id=contributors><a href=https://github.com/krau/SaveAny-Bot/graphs/contributors>Contributors</a>
|
||||
<a class=anchor href=#contributors>#</a></h2><p><img src="https://contrib.rocks/image?repo=krau/SaveAny-Bot&max=750&columns=20" alt=Contributors></p></article><footer class=book-footer><div class="flex flex-wrap justify-between"><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/commit/95f7d5abb5f63536b1ff008f95689cce69ce4253 title='Last modified by krau | 2025/12/19' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
|
||||
<span>2025/12/19</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/_index.md target=_blank rel=noopener><img src=/svg/edit.svg class=book-icon alt>
|
||||
<span>Edit this page</span></a></div></div><script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script></footer><div class=book-comments></div><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav id=TableOfContents><ul><li><a href=#-features>🎯 Features</a></li><li><a href=#contributors><a href=https://github.com/krau/SaveAny-Bot/graphs/contributors>Contributors</a></a></li></ul></nav></div></aside></main></body></html>
|
||||
@@ -2,9 +2,9 @@
|
||||
Installation and Updates
|
||||
<a class="anchor" href="#installation-and-updates">#</a>
|
||||
</h1>
|
||||
<h2 id="deploy-from-pre-compiled-files">
|
||||
Deploy from Pre-compiled Files
|
||||
<a class="anchor" href="#deploy-from-pre-compiled-files">#</a>
|
||||
<h2 id="deploy-from-pre-compiled-files-recommended">
|
||||
Deploy from Pre-compiled Files (Recommended)
|
||||
<a class="anchor" href="#deploy-from-pre-compiled-files-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>
|
||||
|
||||
@@ -1 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>https://sabot.unv.app/en/deployment/</loc><lastmod>2025-06-16T16:30:45+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/"/></url><url><loc>https://sabot.unv.app/en/usage/</loc><lastmod>2025-06-16T16:30:45+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/usage/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/usage/"/></url><url><loc>https://sabot.unv.app/en/help/</loc><lastmod>2025-06-16T16:30:45+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/help/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/help/"/></url><url><loc>https://sabot.unv.app/en/contribute/</loc><lastmod>2025-06-16T16:30:45+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/contribute/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/contribute/"/></url><url><loc>https://sabot.unv.app/en/categories/</loc><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/categories/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/categories/"/></url><url><loc>https://sabot.unv.app/en/deployment/configuration/</loc><lastmod>2025-12-04T22:59:23+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/configuration/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/configuration/"/></url><url><loc>https://sabot.unv.app/en/deployment/installation/</loc><lastmod>2025-08-24T14:47:13+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/installation/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/installation/"/></url><url><loc>https://sabot.unv.app/en/</loc><lastmod>2025-12-04T22:59:23+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/"/></url><url><loc>https://sabot.unv.app/en/deployment/configuration/storages/</loc><lastmod>2025-12-04T22:59:23+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/configuration/storages/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/configuration/storages/"/></url><url><loc>https://sabot.unv.app/en/tags/</loc><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/tags/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/tags/"/></url></urlset>
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>https://sabot.unv.app/en/deployment/</loc><lastmod>2025-06-16T16:30:45+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/"/></url><url><loc>https://sabot.unv.app/en/usage/</loc><lastmod>2025-12-19T21:03:58+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/usage/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/usage/"/></url><url><loc>https://sabot.unv.app/en/help/</loc><lastmod>2025-06-16T16:30:45+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/help/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/help/"/></url><url><loc>https://sabot.unv.app/en/contribute/</loc><lastmod>2025-12-19T21:03:58+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/contribute/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/contribute/"/></url><url><loc>https://sabot.unv.app/en/categories/</loc><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/categories/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/categories/"/></url><url><loc>https://sabot.unv.app/en/deployment/configuration/</loc><lastmod>2025-12-19T21:03:58+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/configuration/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/configuration/"/></url><url><loc>https://sabot.unv.app/en/deployment/installation/</loc><lastmod>2025-12-19T21:03:58+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/installation/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/installation/"/></url><url><loc>https://sabot.unv.app/en/</loc><lastmod>2025-12-19T21:03:58+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/"/></url><url><loc>https://sabot.unv.app/en/deployment/configuration/storages/</loc><lastmod>2025-12-19T21:03:58+08:00</lastmod><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/deployment/configuration/storages/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/deployment/configuration/storages/"/></url><url><loc>https://sabot.unv.app/en/tags/</loc><xhtml:link rel="alternate" hreflang="zh" href="https://sabot.unv.app/tags/"/><xhtml:link rel="alternate" hreflang="en" href="https://sabot.unv.app/en/tags/"/></url></urlset>
|
||||
@@ -2,35 +2,42 @@
|
||||
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
|
||||
#
|
||||
|
||||
The bot accepts two types of messages: files and links.
|
||||
Supported links:
|
||||
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 within.
|
||||
Telegra.ph article links. The bot will download all images in the article.
|
||||
|
||||
|
||||
Silent Mode
|
||||
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."><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 # File Transfer # The bot accepts two types of messages: files and links.
|
||||
Supported links:
|
||||
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 within. Silent Mode # 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."><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>
|
||||
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.
|
||||
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>
|
||||
<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 Mode</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></ul></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=usage>Usage
|
||||
<a class=anchor href=#usage>#</a></h1><h2 id=file-transfer>File Transfer
|
||||
<a class=anchor href=#file-transfer>#</a></h2><p>The bot accepts two types of messages: files and links.</p><p>Supported links:</p><ol><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 within.</li></ol><h2 id=silent-mode>Silent Mode
|
||||
<a class=anchor href=#silent-mode>#</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>Allows you to set some redirection rules for the bot when uploading files to storage, for automatic organization of saved files.</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></ol><p>Basic syntax for adding rules:</p><p>“Rule Type Rule Content Storage Name Path”</p><p>Pay attention to the use of 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>Additionally, if “CHOSEN” is used as the storage name in the rule, it means the file will be stored in the path of the storage selected via button click.</p><p>Rule descriptions:</p><h3 id=filename-regex>FILENAME-REGEX
|
||||
English</a></label><ul><li><a href=/usage/>简体中文</a></li></ul></li></ul><ul><li><a href=https://github.com/krau/SaveAny-Bot target=_blank rel=noopener>🔗 GitHub</a></li></ul><ul><li><span>Deployment Guide</span><ul><li><a href=/en/deployment/configuration/>Configuration Guide</a><ul><li><a href=/en/deployment/configuration/storages/>Storage Configuration</a></li></ul></li><li><a href=/en/deployment/installation/>Installation and Updates</a></li></ul></li><li><a href=/en/usage/ class=active>Usage</a><ul></ul></li><li><a href=/en/help/>Frequently Asked Questions</a><ul></ul></li><li><a href=/en/contribute/>Contributing</a><ul></ul></li></ul></nav><script>(function(){var e=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script></div></aside><div class=book-page><header class=book-header><div class="flex align-center justify-between"><label for=menu-control><img src=/svg/menu.svg class=book-icon alt=Menu></label><h3>Usage</h3><label for=toc-control><img src=/svg/toc.svg class=book-icon alt="Table of Contents"></label></div><aside class="hidden clearfix"><nav id=TableOfContents><ul><li><a href=#file-transfer>File Transfer</a></li><li><a href=#silent-mode-silent>Silent Mode (silent)</a></li><li><a href=#storage-rules>Storage Rules</a><ul><li><a href=#filename-regex>FILENAME-REGEX</a></li><li><a href=#message-regex>MESSAGE-REGEX</a></li><li><a href=#is-album>IS-ALBUM</a></li></ul></li><li><a href=#watch-chats>Watch Chats</a><ul><li><a href=#msgre>msgre</a></li></ul></li><li><a href=#save-files-outside-telegram>Save Files Outside Telegram</a></li></ul></nav></aside></header><article class="markdown book-article"><h1 id=usage>Usage
|
||||
<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 /videos directory in the storage named MyAlist (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></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/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 Mode</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></ul></li></ul></nav></div></aside></main></body></html>
|
||||
</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=save-files-outside-telegram>Save Files Outside Telegram
|
||||
<a class=anchor href=#save-files-outside-telegram>#</a></h2><p>Besides files on Telegram, the bot can also save files from other websites via JavaScript plugins or built-in parsers.</p><blockquote><p>See the <a href=../contribute>Contributing Parsers</a> document for details.</p></blockquote><p>Just send links that match the requirements of a parser to the bot. Currently built-in parsers include:</p><ul><li>Twitter</li><li>Kemono</li></ul></article><footer class=book-footer><div class="flex flex-wrap justify-between"><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/commit/95f7d5abb5f63536b1ff008f95689cce69ce4253 title='Last modified by krau | 2025/12/19' target=_blank rel=noopener><img src=/svg/calendar.svg class=book-icon alt>
|
||||
<span>2025/12/19</span></a></div><div><a class="flex align-center" href=https://github.com/krau/saveany-bot/edit/main/docs/content/en/usage/_index.md target=_blank rel=noopener><img src=/svg/edit.svg class=book-icon alt>
|
||||
<span>Edit this page</span></a></div></div><script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script></footer><div class=book-comments></div><label for=menu-control class="hidden book-menu-overlay"></label></div><aside class=book-toc><div class=book-toc-content><nav id=TableOfContents><ul><li><a href=#file-transfer>File Transfer</a></li><li><a href=#silent-mode-silent>Silent Mode (silent)</a></li><li><a href=#storage-rules>Storage Rules</a><ul><li><a href=#filename-regex>FILENAME-REGEX</a></li><li><a href=#message-regex>MESSAGE-REGEX</a></li><li><a href=#is-album>IS-ALBUM</a></li></ul></li><li><a href=#watch-chats>Watch Chats</a><ul><li><a href=#msgre>msgre</a></li></ul></li><li><a href=#save-files-outside-telegram>Save Files Outside Telegram</a></li></ul></nav></div></aside></main></body></html>
|
||||
Reference in New Issue
Block a user