900823cdb9705186d2fd029aba3b60b569701aa0
* refactor: a big refactor. wip * refactor: port handle file * refactor: place all handlers * fix: task info nil pointer * feat: enhance task progress tracking and context management * feat: cancel task * feat: stream mode * feat: silent mode * feat: dir cmd * refactor: remove unused old file * feat: rule cmd * feat: handle silent mode * feat: batch task * fix: batch task progress and temp file cleanup * refactor: update file creation and cleanup methods for better resource management * feat: add save command with silent mode handling * feat: message link * feat: update message prompts to include file count in storage selection * feat: slient save links * refactor: reduce dup code * feat: rule type * feat: chose dir * feat: refactor file handling and storage rules, improve error handling and logging * feat: rule mode * feat: telegraph pics * fix: tphpics nil pointer and inaccurate dirpath * feat: silent save telegraph * feat: add suffix to avoid file overwrite * feat: new storage telegram * chore: tidy go mod
Deployment
Deploy from Binary
Download the binary file for your platform from the Release page.
Create a config.toml file in the extracted directory, refer to config.example.toml for configuration.
Run:
chmod +x saveany-bot
./saveany-bot
Add as systemd Service
Create 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=on-failure
[Install]
WantedBy=multi-user.target
Enable auto-start and start the service:
systemctl enable --now saveany-bot
Deploy with Docker
Docker Compose
Download docker-compose.yml file and create a config.toml file in the same directory, refer to config.example.toml for configuration.
Run:
docker compose up -d
Docker
docker run -d --name saveany-bot \
-v /path/to/config.toml:/app/config.toml \
-v /path/to/downloads:/app/downloads \
ghcr.io/krau/saveany-bot:latest
Update
Use upgrade or up command to upgrade to the latest version:
./saveany-bot upgrade
If deployed with Docker, use the following commands to update:
docker pull ghcr.io/krau/saveany-bot:latest
docker restart saveany-bot
Usage
Send (forward) files to the Bot and follow the prompts.
Sponsors
This project is supported by YxVM and NodeSupport.
You can consider sponsoring me if this project helps you:
Thanks
- gotd
- TG-FileStreamBot
- gotgproto
- All the dependencies
Languages
Go
98.7%
JavaScript
1%
Dockerfile
0.2%