Skip to main content

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

PyPI version Downloads Downloads GitHub Contributors GitHub commit activity GitHub last commit Python 3.6

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 setup --cahtid -1001234567890 --token 1234:asdfgjkl --server http://127.0.0.1:8081      # 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


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.1.2.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

tl_bot-0.1.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file tl_bot-0.1.2.tar.gz.

File metadata

  • Download URL: tl_bot-0.1.2.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for tl_bot-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4284394a67e3742d68527caf05b7c63b5b1564d6f32d9140f73df61dbd6ef0fc
MD5 637f7f62ad5871e90541fce94baec9e9
BLAKE2b-256 96f66be2fd7997e4cc366e74169bb8d7d211bdd202b4fe49d7ff0b7fabf080ac

See more details on using hashes here.

File details

Details for the file tl_bot-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: tl_bot-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for tl_bot-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ee3511f8468b02d8ddab9fc9cc0620000deccf5e24c770b51c1ab76c948c4636
MD5 04e40d2c76a41b1535abbe4252bb4386
BLAKE2b-256 b6c55c584abc8a6a76ed2684544fa2061f91bae768f0007e3045bb42d3f3575e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page