chore: update
This commit is contained in:
28
README.md
28
README.md
@@ -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 发送(转发)文件, 按照提示操作.
|
||||
@@ -1,31 +1,34 @@
|
||||
[telegram]
|
||||
token = ""
|
||||
admins = []
|
||||
token = "" # Bot Token
|
||||
admins = [777000] # 你的 user_id
|
||||
api = "https://api.telegram.org"
|
||||
|
||||
[log]
|
||||
level = "DEBUG"
|
||||
level = "DEBUG" # 日志等级
|
||||
|
||||
[temp]
|
||||
base_path = "cache/"
|
||||
cache_ttl = 30
|
||||
base_path = "cache/" # 临时目录, 请不要在此目录下存放任何其他文件
|
||||
cache_ttl = 30 # 临时文件保存时间, 单位: 秒
|
||||
|
||||
[db]
|
||||
path = "data/data.db" # 数据库文件路径
|
||||
|
||||
[storage]
|
||||
[storage.alist]
|
||||
[storage.alist] # Alist
|
||||
enable = true
|
||||
base_path = "/telegram" # 保存路径
|
||||
username = "admin" # 用户名
|
||||
password = "password" # 密码
|
||||
url = "https://alist.com" # Alist 地址
|
||||
token_exp = 86400 # token 过期时间, 单位: 秒
|
||||
|
||||
[storage.local] # 本地磁盘
|
||||
enable = true
|
||||
base_path = "downloads/" # 保存路径
|
||||
|
||||
[storage.webdav] # WebDav
|
||||
enable = true
|
||||
base_path = "/telegram"
|
||||
username = "admin"
|
||||
password = "password"
|
||||
url = "https://alist.com"
|
||||
token_exp = 86400
|
||||
|
||||
[storage.local]
|
||||
enable = true
|
||||
base_path = "downloads/"
|
||||
|
||||
[storage.webdav]
|
||||
enable = true
|
||||
base_path = "/telegram"
|
||||
username = "admin"
|
||||
password = "password"
|
||||
url = "https://alist.com/dav"
|
||||
url = "https://alist.com/dav"
|
||||
|
||||
Reference in New Issue
Block a user