mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-08-29 12:16:43 +08:00
v0.60.4
gotd's downloader is size-unaware: when a file's size is an exact multiple of the 1MiB part size, it issues one final upload.getFile at offset == size, which Telegram rejects with 400 OFFSET_INVALID, failing the whole download. Wrap the client to answer such requests with an empty chunk, matching the EOF semantics the downloader expects. Regression test uses a fake client with real server behavior (OFFSET_INVALID past EOF).
fix: add ca-certificates installation and environment variables for SSL support in Dockerfile, close #222
Save Any Bot
English | 简体中文
Save Any Telegram File to Anywhere 📂. Support restrict saving content and beyond telegram.
🎯 Features
- Support documents / videos / photos / stickers… and even Telegraph
- Bypass "restrict saving content" media
- Batch download
- Streaming transfer
- Multi-user support
- Auto organize files based on storage rules
- Watch specified chats and auto-save messages, with filters
- Transfer files between different storage backends
- Integrate with yt-dlp to download and save media from 1000+ websites
- Aria2 integration to download files from URLs/magnets and save to storages
- Write JS parser plugins to save files from almost any website
- Storage backends:
- Alist
- S3
- WebDAV
- Local filesystem
- Rclone (via command line)
- Telegram (re-upload to specified chats)
📦 Quick Start
Create a config.toml file with the following content:
lang = "en" # Language setting, "en" for English
[telegram]
token = "" # Your bot token, obtained from @BotFather
[telegram.proxy]
# Enable proxy for Telegram
enable = false
url = "socks5://127.0.0.1:7890"
[[storages]]
name = "Local Disk"
type = "local"
enable = true
base_path = "./downloads"
[[users]]
id = 114514 # Your Telegram account id
storages = []
blacklist = true
Run Save Any Bot with Docker:
docker run -d --name saveany-bot \
-v ./config.toml:/app/config.toml \
-v ./downloads:/app/downloads \
ghcr.io/krau/saveany-bot:latest
Please read the docs for more configuration options and usage.
Sponsors
This project is supported by YxVM and NodeSupport.
If this project is helpful to you, consider sponsoring me via:
Thanks To
- gotd
- TG-FileStreamBot
- gotgproto
- tdl
- All the dependencies, contributors, sponsors and users.
Contact
Languages
Go
99%
JavaScript
0.8%
Dockerfile
0.1%