Repository navigation
Replies: 1 comment 1 reply
|
你好!关于下载存储机器人且限制下载的资源,这个功能目前是支持的。 配置方法: 如果你想从一个存储机器人(Storage Bot)下载文件,并且限制下载的资源类型或大小,可以这样配置: api_hash: your_api_hash
api_id: your_api_id
chat:
- chat_id: "@storage_bot_username" # 或使用数字ID
last_read_message_id: 0
download_filter: "file_size < 100000000 and media_type in [video, document]" # 限制文件大小和类型
media_types:
- video
- document
# 不包含 photo, audio 等其他类型
file_formats:
video:
- mp4
- mkv
document:
- pdf
- zip常用的限制条件:
download_filter: "file_size < 100000000" # 小于100MB
media_types:
- video
- document
file_formats:
document:
- pdf
- docx
download_filter: "message_date >= 2025-01-01"
download_filter: "file_size < 100000000 and message_date >= 2025-01-01 and media_type == video"这样就可以从存储机器人下载文件,并且只下载符合条件的资源。 |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
新增支持下载存储机器人且限制下载的资源
All reactions