-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
45 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 发送(转发)文件, 按照提示操作. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
token_exp = 86400 | ||
base_path = "/telegram" # 保存路径 | ||
username = "admin" # 用户名 | ||
password = "password" # 密码 | ||
url = "https://alist.com" # Alist 地址 | ||
token_exp = 86400 # token 过期时间, 单位: 秒 | ||
|
||
[storage.local] | ||
[storage.local] # 本地磁盘 | ||
enable = true | ||
base_path = "downloads/" | ||
base_path = "downloads/" # 保存路径 | ||
|
||
[storage.webdav] | ||
[storage.webdav] # WebDav | ||
enable = true | ||
base_path = "/telegram" | ||
username = "admin" | ||
password = "password" | ||
url = "https://alist.com/dav" | ||
url = "https://alist.com/dav" |