This commit is contained in:
krau
2025-12-19 13:04:24 +00:00
parent 5f18cf4697
commit ca2d061555
10 changed files with 117 additions and 69 deletions

View File

@@ -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 Bots features and basic usage. If you cant find what you need here, please also see the Configuration Guide or ask in GitHub Discussions.
File Transfer # To use the bots 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>&ldquo;Rule Type Rule Content Storage Name Path&rdquo;</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 &ldquo;CHOSEN&rdquo; 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&rsquo;s features and basic usage. If you can&rsquo;t find what you need here, please also see the <a href=../deployment/configuration>Configuration Guide</a> or ask in GitHub <a href=https://github.com/krau/SaveAny-Bot/discussions>Discussions</a>.</p><h2 id=file-transfer>File Transfer
<a class=anchor href=#file-transfer>#</a></h2><p>To use the bot&rsquo;s Telegram file saving feature, you need to send or forward the following types of messages to the bot:</p><ol><li>File or media messages, such as images, videos, documents, etc.</li><li>Telegram message links, for example: <code>https://t.me/acherkrau/1097</code>. <strong>Even if the channel prohibits forwarding and saving, the bot can still download its files.</strong></li><li>Telegra.ph article links. The bot will download all images in the article.</li></ol><h2 id=silent-mode-silent>Silent Mode (silent)
<a class=anchor href=#silent-mode-silent>#</a></h2><p>Use the <code>/silent</code> command to toggle silent mode.</p><p>By default, silent mode is off, and the bot will ask you for the save location of each file.</p><p>When silent mode is enabled, the bot will save files directly to the default location without confirmation.</p><p>Before enabling silent mode, you need to set the default save location using the <code>/storage</code> command.</p><h2 id=storage-rules>Storage Rules
<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>&ldquo;RuleType RuleContent StorageName Path&rdquo;</p><p>Pay attention to spaces; the bot can only parse correctly formatted syntax. Below is an example of a valid rule command:</p><pre tabindex=0><code>/rule add FILENAME-REGEX (?i)\.(mp4|mkv|ts|avi|flv)$ MyAlist /videos
</code></pre><p>In addition, if <code>CHOSEN</code> is used as the storage name in the rule, it means files will be stored under the path of the storage you selected by clicking the inline button.</p><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 &lt;chat_id/username&gt; [filter]
</code></pre><p>Stop watching:</p><pre tabindex=0><code>/unwatch &lt;chat_id/username&gt;
</code></pre><p>Filter types:</p><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>