upload files to your telegram channel or group with your telegram bot
Project description
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 # setup your telegram credentials
t-bot reset # reset to default your telegram credentials
t-bot test # test telegram bot token
t-bot getid # get chat id of your connected group or channel
t-bot up {file_name} -c file_caption # upload Telegram channel or group
t-bot d {url} -c caption # download and upload file to your Telegram channel or group
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) # bot_token type str
tl_bot.main.uploader(bot_token: str, chat_id: str, file_name: str, server_url: str, caption: str = None)
from tl_bot.main import uploadd_file
uploadd_file(bot_token, chat_id, file_name, caption) # all arguments must be str
tl_bot.main.download(url:str, bot_token:str, chat_id:str, caption:str=None)
from tl_bot.main import download
download(url, bot_token, chat_id, caption) # all arguments must be str
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tl-bot-0.0.7.tar.gz
(6.6 kB
view details)
Built Distribution
File details
Details for the file tl-bot-0.0.7.tar.gz
.
File metadata
- Download URL: tl-bot-0.0.7.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 579ee387c373724f578ca0d8e6c4c2775143b090242ba1a2c5ebb263046f676e |
|
MD5 | 047edaa1fc6b45641e87febac362e2da |
|
BLAKE2b-256 | 6b6076af66a633bf109b4f8dce07613d205c17c15043b7f630e5a605e3f21e58 |
Provenance
File details
Details for the file tl_bot-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: tl_bot-0.0.7-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f272d08af0fa52efde3195aa0abc85c69b118353da60d086822b02b368509aa |
|
MD5 | a581f0258b7dd46a44ae54d51b8444e9 |
|
BLAKE2b-256 | 6f297c0f097d05bb1be03142771735db26b2fbb77f2e8b6438cc003551835a29 |