t-bot
Upload files to your Telegram channel or group with your telegram bot
Features
- Progress bar
- You can change file name before upload on telegram
Note : Bot can upload only 50 MB file (with default telegram bot api server url).
Installation
pip3 install tl-bot
Usage
t-bot setup
t-bot setup --cahtid -1001234567890 --token 1234:asdfgjkl --server http://127.0.0.1:8081
t-bot reset
t-bot test
t-bot getid
t-bot up {file_name} -c file_caption
t-bot d {url} -c caption
API
The anonfile-upload client is also usable through an API (for test integration, automation, etc)
tl_bot.main.test_token(bot_token)
from tl_bot.main import test_token
test_token(bot_token)
tl_bot.main.uploader(bot_token: str, chat_id: str, file_name: str, server_url: str, caption: str)
from tl_bot.main import uploader
uploader(bot_token, chat_id, file_name, server_url, caption)
tl_bot.main.download(url:str, bot_token:str, chat_id:str, caption:str)
from tl_bot.main import download
download(url, bot_token, chat_id, caption)