mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-09-05 15:46:37 +08:00
chore: update
This commit is contained in:
@@ -1 +1,27 @@
|
|||||||
# Save Any Bot
|
# Save Any Bot
|
||||||
|
|
||||||
|
把 Telegram 的文件保存到各类存储端.
|
||||||
|
|
||||||
|
> *就像 PikPak Bot 一样*
|
||||||
|
|
||||||
|
## 部署
|
||||||
|
|
||||||
|
在 [Release](https://github.com/krau/SaveAny-Bot/releases) 页面下载对应平台的二进制文件.
|
||||||
|
|
||||||
|
在解压后目录新建 `config.toml` 文件, 参考 [config.toml.example](https://github.com/krau/SaveAny-Bot/blob/main/config.example.toml) 编辑配置文件.
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> 由于 Telegram 官方 Bot API 的限制, Bot 无法下载大于 20MB 的文件. 你需要部署一个本地的 Telegram Bot API 来解决这个问题, 然后将配置文件中的 telegram.api 改为你自己的 api 地址.
|
||||||
|
>
|
||||||
|
> 参考: [telegram-bot-api-compose](https://github.com/krau/telegram-bot-api-compose)
|
||||||
|
|
||||||
|
运行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
chmod +x saveany-bot
|
||||||
|
./saveany-bot
|
||||||
|
```
|
||||||
|
|
||||||
|
## 使用
|
||||||
|
|
||||||
|
向 Bot 发送(转发)文件, 按照提示操作.
|
||||||
+17
-14
@@ -1,29 +1,32 @@
|
|||||||
[telegram]
|
[telegram]
|
||||||
token = ""
|
token = "" # Bot Token
|
||||||
admins = []
|
admins = [777000] # 你的 user_id
|
||||||
api = "https://api.telegram.org"
|
api = "https://api.telegram.org"
|
||||||
|
|
||||||
[log]
|
[log]
|
||||||
level = "DEBUG"
|
level = "DEBUG" # 日志等级
|
||||||
|
|
||||||
[temp]
|
[temp]
|
||||||
base_path = "cache/"
|
base_path = "cache/" # 临时目录, 请不要在此目录下存放任何其他文件
|
||||||
cache_ttl = 30
|
cache_ttl = 30 # 临时文件保存时间, 单位: 秒
|
||||||
|
|
||||||
|
[db]
|
||||||
|
path = "data/data.db" # 数据库文件路径
|
||||||
|
|
||||||
[storage]
|
[storage]
|
||||||
[storage.alist]
|
[storage.alist] # Alist
|
||||||
enable = true
|
enable = true
|
||||||
base_path = "/telegram"
|
base_path = "/telegram" # 保存路径
|
||||||
username = "admin"
|
username = "admin" # 用户名
|
||||||
password = "password"
|
password = "password" # 密码
|
||||||
url = "https://alist.com"
|
url = "https://alist.com" # Alist 地址
|
||||||
token_exp = 86400
|
token_exp = 86400 # token 过期时间, 单位: 秒
|
||||||
|
|
||||||
[storage.local]
|
[storage.local] # 本地磁盘
|
||||||
enable = true
|
enable = true
|
||||||
base_path = "downloads/"
|
base_path = "downloads/" # 保存路径
|
||||||
|
|
||||||
[storage.webdav]
|
[storage.webdav] # WebDav
|
||||||
enable = true
|
enable = true
|
||||||
base_path = "/telegram"
|
base_path = "/telegram"
|
||||||
username = "admin"
|
username = "admin"
|
||||||
|
|||||||
Reference in New Issue
Block a user