diff --git a/en/contribute/index.html b/en/contribute/index.html index 064d384..7fdd0c4 100644 --- a/en/contribute/index.html +++ b/en/contribute/index.html @@ -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. -">Contributing | Save Any Bot + + + Contributing New Parsers + # + +You can either implement native parsers in Go (recommended), or write JavaScript-based parser plugins.">Contributing | Save Any Bot

Contributing

Contributing -#

Contributing New Storage Backend -#

  1. Fork this repository and clone it to your local machine.
  2. Add the new storage backend type in pkg/enums/storage/storages.go and run code generation.
  3. Define the storage backend configuration in the config/storage directory and add it to config/storage/factory.go.
  4. Create a new package in the storage directory, implement the storage backend, and import it in storage/storage.go.
  5. Update the documentation to include configuration details for the new storage backend.
\ No newline at end of file +English

Contributing

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:

Contributing New Storage Backend +#

  1. Add the new storage backend type in pkg/enums/storage/storages.go and run code generation.
  2. Define the storage backend configuration in the config/storage directory and add it to config/storage/factory.go.
  3. Create a new package in the storage directory, implement the storage backend, and import it in storage/storage.go.
  4. 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.

If you use Go:

  1. Create a new package under the parsers directory and implement the parser logic.
  2. Register the parser in the init function in parsers/parser.go.

If you use JavaScript:

  1. Refer to plugins/example_parser_basic.js as an example.
  2. Create a new .js file in the plugins directory and implement your parsing logic there.

Note: Parsers under the plugins 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.

\ No newline at end of file diff --git a/en/deployment/configuration/index.html b/en/deployment/configuration/index.html index f660a90..65d6956 100644 --- a/en/deployment/configuration/index.html +++ b/en/deployment/configuration/index.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:">Configuration Guide | Save Any Bot

Configuration Guide

Configuration Guide

Configuration Guide #

SaveAnyBot uses the toml format for its configuration files. You can learn more about toml syntax on the TOML official website.

SaveAnyBot needs to read a config.toml 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.

Here is an example of a minimal configuration file:

[telegram]
 token = "1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 
@@ -25,8 +25,13 @@ English

Detailed Configuration #

Global Configuration -#

  • stream: Whether to enable Stream mode, default is false. When enabled, the Bot will stream files directly to storage endpoints (if supported), without downloading them locally.
    Stream mode is very useful for deployment environments with limited disk space, but it also has some drawbacks:
    • Cannot use multi-threading to download files from Telegram, resulting in slower speeds.
    • Higher task failure rate when the network is unstable.
    • Cannot process files in the middle layer, such as automatic file type identification.
    • Not supported by all storage endpoints; unsupported endpoints may downgrade to normal mode or fail to upload.
  • workers: Number of tasks to process simultaneously, default is 3.
  • threads: Number of threads used when downloading files, default is 4. Only effective when Stream mode is not enabled.
  • retry: Number of retries when a task fails, default is 3.

Telegram Configuration -#

  • token: Your Telegram Bot Token, which can be obtained by creating a Bot through BotFather.
  • app_id, app_hash: Telegram API ID & Hash, obtained by creating an application at Telegram API. Default values will be used if not provided.
  • flood_retry: Number of retries for flood control, default is 5.
  • rpc_retry: Number of retries for RPC requests, default is 5.
  • proxy: Proxy configuration, optional.
    • enable: Whether to enable the proxy.
    • url: Proxy address, only supports socks5://
[telegram]
+#
  • stream: Whether to enable Stream mode, default is false. When enabled, the Bot will stream files directly to storage endpoints (if supported), without downloading them locally.
    Stream mode is very useful for deployment environments with limited disk space, but it also has some drawbacks:
    • Cannot use multi-threading to download files from Telegram, resulting in slower speeds.
    • Higher task failure rate when the network is unstable.
    • Cannot process files in the middle layer, such as automatic file type identification.
    • Not supported by all storage endpoints; unsupported endpoints may downgrade to normal mode or fail to upload.
  • workers: Number of tasks to process simultaneously, default is 3.
  • threads: Number of threads used when downloading files, default is 4. Only effective when Stream mode is not enabled.
  • retry: Number of retries when a task fails, default is 3.
  • proxy: Global proxy configuration. After setting this, all network connections inside the program will try to use this proxy. Optional.
stream = false
+workers = 3
+threads = 4
+retry = 3
+proxy = "socks5://127.0.0.1:7890"
+

Telegram Configuration +#

  • token: Your Telegram Bot Token, which can be obtained by creating a Bot through BotFather.
  • app_id, app_hash: Telegram API ID & Hash, obtained by creating an application at Telegram API. Default values will be used if not provided.
  • flood_retry: Number of retries for flood control, default is 5.
  • rpc_retry: Number of retries for RPC requests, default is 5.
  • proxy: Proxy configuration, optional.
    • enable: Whether to enable the proxy.
    • url: Proxy address, only supports socks5://
  • userbot: Userbot configuration, optional.
    • enable: Enable userbot integration. Requires logging in with a user account; you should use your own API ID & Hash when enabling this.
    • session: Path to the userbot session file, default is data/usersession.db.
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.
On the first start after enabling userbot, you need to input phone number, 2FA and verification code in the terminal.
If you deploy with Docker, please run the container with `-it` for an interactive environment, then perform the login.
[telegram]
 token = "1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 app_id = 1025907
 app_hash = "452b0359b988148995f22ff0f4229750"
@@ -35,6 +40,9 @@ English
  • 简体中文[telegram.proxy] enable = false url = "socks5://127.0.0.1:7890" +[telegram.userbot] +enable = false +session = "data/usersession.db"

Storage Endpoints List #

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 [[storages]].

Each storage endpoint requires at least the following fields:

  • name: Storage endpoint name, used for identification in the Bot, must be unique.
  • enable: Whether to enable this storage endpoint, default is true.
  • type: Storage endpoint type, currently supports the following types:
    • local: Local disk
    • alist: Alist
    • webdav: WebDAV
    • s3: aws S3 and other S3 compatible services
    • telegram: Upload to Telegram

Example, this is a configuration that includes local storage and webdav storage:

[[storages]]
 name = "Local Storage"
@@ -66,11 +74,21 @@ English

Miscellaneous +

Events +#

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 [hook.exec].

Supported event types:

  • task_before_start: Before a task starts
  • task_success: After a task completes successfully
  • task_fail: After a task fails
  • task_cancel: After a task is cancelled

The configured value must be a full shell command line. The bot will execute this command when the event occurs. Example:

[hook.exec]
+task_before_start = "echo 'task is about to start'"
+task_success = "bash /path/to/success_script.sh"
+task_fail = "curl -X POST https://example.com/api/notify -d 'task failed'"
+task_cancel = "bash /path/to/cancel_script.sh"
+

Parsers +#

Parsers give the bot the ability to handle non-Telegram files, such as downloading files from other websites. Configure them via [parsers].

[parsers]
+plugin_enable = true # Whether to enable parser plugins
+plugin_dirs = ["./plugins"] # Plugin directories, can be multiple
+

The above settings only control JavaScript-based parser plugins. The bot also has built-in parsers implemented in Go, which are enabled by default.

Miscellaneous #

no_clean_cache = false # Whether not to clear the cache folder when exiting
 # Temporary download folder configuration
 [temp]
 base_path = "./cache"
-
\ No newline at end of file +
\ No newline at end of file diff --git a/en/deployment/configuration/storages/index.html b/en/deployment/configuration/storages/index.html index d873aaa..6fc66aa 100644 --- a/en/deployment/configuration/storages/index.html +++ b/en/deployment/configuration/storages/index.html @@ -24,7 +24,7 @@ token = "your_token" type=local'>Storage Configuration | Save Any Bot +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'>Storage Configuration | Save Any Bot

Storage Configuration

S3 -#

type=s3

endpoint = "s3.example.com" # Endpoint for S3
+#

type=s3

endpoint = "s3.example.com" # Endpoint for S3, defaults to AWS S3 endpoint if not set
 region = "us-east-1" # Region for S3
 access_key_id = "your_access_key_id" # Access key ID for S3
 secret_access_key = "your_secret_access_key" # Secret access key for S3
 bucket_name = "your_bucket_name" # Bucket name for S3
-use_ssl = true # Whether to use SSL, default is true
 base_path = "/path/to/s3" # Base path in S3, all files will be stored under this path
-

Telegram -#

type=telegram

Stream mode is not supported.

chat_id = "123456789" # Telegram chat ID, the Bot will send files to this chat
-

Example of virtual-host-style URL:

https://your_bucket_name.s3.example.com/path/to/s3/your_file
+

Example of path-style URL (when virtual_host is false):

https://s3.example.com/your_bucket_name/path/to/s3/your_file
+

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.

Telegram +#

type=telegram

Stream mode is not supported.

chat_id = "123456789" # Telegram chat ID, the bot will send files to this chat
+force_file = false # Force sending as file, default is false
+skip_large = false # Skip large files, default is false. If enabled, files exceeding Telegram's limit will not be uploaded.
+spilt_size_mb = 2000 # 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.
+
\ No newline at end of file diff --git a/en/deployment/index.xml b/en/deployment/index.xml index a55e5b5..e628c46 100644 --- a/en/deployment/index.xml +++ b/en/deployment/index.xml @@ -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> diff --git a/en/deployment/installation/index.html b/en/deployment/installation/index.html index f757703..127c99e 100644 --- a/en/deployment/installation/index.html +++ b/en/deployment/installation/index.html @@ -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.">Installation and Updates | Save Any Bot +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.">Installation and Updates | Save Any Bot

Installation and Updates

Installation and Updates -#

Deploy from Pre-compiled Files -#

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
+English

Installation and Updates

Installation and Updates +#

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 #

@@ -163,10 +163,12 @@ Then set permissions:
chmod +x /usr/bin/sabot<
     -v /path/to/config.toml:/app/config.toml \
     -v /path/to/downloads:/app/downloads \
     ghcr.io/krau/saveany-bot:latest
-

Updates -#

Use upgrade or up to upgrade to the latest version

./saveany-bot upgrade
-

If you deployed with Docker, use the following commands to update:

docker pull ghcr.io/krau/saveany-bot:latest
+
About Docker image variants
  • Default: Includes all features and dependencies, larger in size. Use this if you don't have special requirements.
  • micro: Slimmed-down image with some optional dependencies removed, smaller in size.
  • pico: Minimal image containing only core features, smallest in size.
You can pull different variants by specifying tags, for example: ghcr.io/krau/saveany-bot:micro
For more details about the variants, see the Dockerfile in the project root.

Updates +#

If you deployed from pre-compiled binaries, use the following CLI command to update:

./saveany-bot up
+

(upgrade is also available as an alias.)

If you deployed with Docker, use the following commands to update:

docker:

docker pull ghcr.io/krau/saveany-bot:latest
 docker restart saveany-bot
-
\ No newline at end of file +

docker compose:

docker compose pull
+docker compose restart
+
\ No newline at end of file diff --git a/en/index.html b/en/index.html index 8969c95..822a1be 100644 --- a/en/index.html +++ b/en/index.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 # ">Introduction | Save Any Bot +🎯 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 #">Introduction | Save Any Bot

Introduction

Introduction

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 -#

Contributors

\ No newline at end of file +

Save Any Bot is a tool that allows you to save files from Telegram to various storage backends.

🎯 Features +#

Contributors +#

Contributors

\ No newline at end of file diff --git a/en/index.xml b/en/index.xml index a91bd93..da1657a 100644 --- a/en/index.xml +++ b/en/index.xml @@ -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> diff --git a/en/sitemap.xml b/en/sitemap.xml index 72d4197..5450eeb 100644 --- a/en/sitemap.xml +++ b/en/sitemap.xml @@ -1 +1 @@ -https://sabot.unv.app/en/deployment/2025-06-16T16:30:45+08:00https://sabot.unv.app/en/usage/2025-06-16T16:30:45+08:00https://sabot.unv.app/en/help/2025-06-16T16:30:45+08:00https://sabot.unv.app/en/contribute/2025-06-16T16:30:45+08:00https://sabot.unv.app/en/categories/https://sabot.unv.app/en/deployment/configuration/2025-12-04T22:59:23+08:00https://sabot.unv.app/en/deployment/installation/2025-08-24T14:47:13+08:00https://sabot.unv.app/en/2025-12-04T22:59:23+08:00https://sabot.unv.app/en/deployment/configuration/storages/2025-12-04T22:59:23+08:00https://sabot.unv.app/en/tags/ \ No newline at end of file +https://sabot.unv.app/en/deployment/2025-06-16T16:30:45+08:00https://sabot.unv.app/en/usage/2025-12-19T21:03:58+08:00https://sabot.unv.app/en/help/2025-06-16T16:30:45+08:00https://sabot.unv.app/en/contribute/2025-12-19T21:03:58+08:00https://sabot.unv.app/en/categories/https://sabot.unv.app/en/deployment/configuration/2025-12-19T21:03:58+08:00https://sabot.unv.app/en/deployment/installation/2025-12-19T21:03:58+08:00https://sabot.unv.app/en/2025-12-19T21:03:58+08:00https://sabot.unv.app/en/deployment/configuration/storages/2025-12-19T21:03:58+08:00https://sabot.unv.app/en/tags/ \ No newline at end of file diff --git a/en/usage/index.html b/en/usage/index.html index 5e8f549..f62c8d6 100644 --- a/en/usage/index.html +++ b/en/usage/index.html @@ -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.">Usage | Save Any Bot +Use the /silent command to toggle silent mode.">Usage | Save Any Bot

Usage

Usage -#

File Transfer -#

The bot accepts two types of messages: files and links.

Supported links:

  1. 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.
  2. 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.

When silent mode is enabled, the bot will save files directly to the default location without confirmation.

Before enabling silent mode, you need to set the default save location using the /storage command.

Storage Rules -#

Allows you to set some redirection rules for the bot when uploading files to storage, for automatic organization of saved files.

See: #28

Currently supported rule types:

  1. FILENAME-REGEX
  2. MESSAGE-REGEX

Basic syntax for adding rules:

“Rule Type Rule Content Storage Name Path”

Pay attention to the use of spaces; the bot can only parse correctly formatted syntax. Below is an example of a valid rule command:

/rule add FILENAME-REGEX (?i)\.(mp4|mkv|ts|avi|flv)$ MyAlist /videos
-

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.

Rule descriptions:

FILENAME-REGEX +English

Usage

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:

  1. File or media messages, such as images, videos, documents, etc.
  2. 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.
  3. Telegra.ph article links. The bot will download all images in the article.

Silent Mode (silent) +#

Use the /silent command to toggle silent mode.

By default, silent mode is off, and the bot will ask you for the save location of each file.

When silent mode is enabled, the bot will save files directly to the default location without confirmation.

Before enabling silent mode, you need to set the default save location using the /storage command.

Storage Rules +#

Storage rules allow you to define redirection rules when the bot uploads files to storage, so that saved files are automatically organized.

See: #28

Currently supported rule types:

  1. FILENAME-REGEX
  2. MESSAGE-REGEX
  3. IS-ALBUM

Basic syntax for adding rules:

“RuleType RuleContent StorageName Path”

Pay attention to spaces; the bot can only parse correctly formatted syntax. Below is an example of a valid rule command:

/rule add FILENAME-REGEX (?i)\.(mp4|mkv|ts|avi|flv)$ MyAlist /videos
+

In addition, if CHOSEN is used as the storage name in the rule, it means files will be stored under the path of the storage you selected by clicking the inline button.

Rule types:

FILENAME-REGEX #

Matches based on filename regex. The rule content must be a valid regular expression, such as:

FILENAME-REGEX (?i)\.(mp4|mkv|ts|avi|flv)$ MyAlist /videos
-

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 base_path in the configuration file).

MESSAGE-REGEX -#

Similar to the above, but matches based on the text content of the message itself.

\ No newline at end of file +

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 base_path in the configuration file).

MESSAGE-REGEX +#

Similar to the above, but matches based on the text content of the message itself.

IS-ALBUM +#

Matches album messages (media groups). Rule content can only be true or false.

If the path in the rule uses NEW-FOR-ALBUM, the bot will create a new folder for each media group and store all files of that group there. See: https://github.com/krau/SaveAny-Bot/issues/87

For example:

IS-ALBUM true MyWebdav NEW-FOR-ALBUM
+

This will save media-group messages to the storage named MyWebdav, creating a new folder (generated from the first file) for each album.

Watch Chats +#

This feature requires enabling UserBot integration.

You can watch messages in a specific chat and automatically save them to the default storage, following storage rules. You can also add filters so that only matching messages are saved.

Watch a chat:

/watch <chat_id/username> [filter]
+

Stop watching:

/unwatch <chat_id/username>
+

Filter types:

msgre +#

Regex-match the message text. For example:

/watch 12345678 msgre:.*hello.*
+

This will watch the chat with ID 12345678, and only save messages whose text contains hello.

Save Files Outside Telegram +#

Besides files on Telegram, the bot can also save files from other websites via JavaScript plugins or built-in parsers.

See the Contributing Parsers document for details.

Just send links that match the requirements of a parser to the bot. Currently built-in parsers include:

\ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index 5f61d1a..ba02d66 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1 +1 @@ -https://sabot.unv.app/zh/sitemap.xml2025-12-19T11:45:52+08:00https://sabot.unv.app/en/sitemap.xml2025-12-04T22:59:23+08:00 \ No newline at end of file +https://sabot.unv.app/zh/sitemap.xml2025-12-19T11:45:52+08:00https://sabot.unv.app/en/sitemap.xml2025-12-19T21:03:58+08:00 \ No newline at end of file