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)
from tl_bot.main import uploader
uploader(bot_token, chat_id, file_name, server_url, caption) # all arguments must be str
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) # 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.9.tar.gz
(6.6 kB
view details)
Built Distribution
File details
Details for the file tl-bot-0.0.9.tar.gz
.
File metadata
- Download URL: tl-bot-0.0.9.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2056b11ead011d353eca9609e3f3675eaed43f788a0f392eb8e5a43405628cf |
|
MD5 | 7b8fbd969adc3e31714dc11b22c1b263 |
|
BLAKE2b-256 | 4b4d99f14d3e015d7b050316d0ba8da2ed4450bf47a3543ea71e78a168176ecb |
Provenance
File details
Details for the file tl_bot-0.0.9-py3-none-any.whl
.
File metadata
- Download URL: tl_bot-0.0.9-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a97b64dd3cf5b36b4acd40f638eca5b3e60027ff7c06820af70957b03b907d7 |
|
MD5 | e71b85385c2af65ded87124ae7921fd9 |
|
BLAKE2b-256 | fe5a5ba1761ffd5815e05f07a4114fd4c439428f9250274674601e4cc9f7ff4c |