Skip to main content

upload files to your telegram channel or group with ypur telegram bot

Project description

t-bot

Upload files to your Telegram channel or group with your telegram bot

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 -U https://github.com/jakbin/t-bot/archive/main.zip

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 file to your server

API

The anonfile-upload client is also usable through an API (for test integration, automation, etc)

t_bot.main.test_token(bot_token)

from t_bot.main import test_token

test_token(bot_token)   # bot_token type str

t_bot.main.uploadd_file(bot_token, chat_id, file_name, caption)

from t_bot.main import uploadd_file

uploadd_file(bot_token, chat_id, file_name, caption)    # all arguments must be str

t_bot.main.download(url:str, bot_token:str, chat_id:str, caption:str=None)

from t_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.0.3.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

tl_bot-0.0.3-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file tl-bot-0.0.3.tar.gz.

File metadata

  • Download URL: tl-bot-0.0.3.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for tl-bot-0.0.3.tar.gz
Algorithm Hash digest
SHA256 d45ba505e1dc9cd8b886e15bcca4a039f0725c9f7a3aa933f06074e9789317e9
MD5 4a912cdd93bfc0eea2f8328857735063
BLAKE2b-256 90224da39a1fc2f67b6ded84728f9542c07efe23c5e3e22b9602ceec5f359afd

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: tl_bot-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for tl_bot-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5862e75546f7182155cd8576bd69d81438e9a5c0d8ee3afe0c8fc84544c7e524
MD5 afd24d5f26e297546bd12a343c98a2a1
BLAKE2b-256 4b4b27bcc5f176b09b1bab0de9445b93c1002cf1279a55c58d2c198d8da44560

See more details on using hashes here.

Provenance

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