# t-bot
Upload files to your Telegram channel or group with your telegram bot
[![PyPI version](https://badge.fury.io/py/tl-bot.svg)](https://pypi.org/project/tl-bot/)
[![Downloads](https://pepy.tech/badge/tl-bot/month)](https://pepy.tech/project/tl-bot)
[![Downloads](https://static.pepy.tech/personalized-badge/tl-bot?period=total&units=international_system&left_color=green&right_color=blue&left_text=Total%20Downloads)](https://pepy.tech/project/tl-bot)
![GitHub Contributors](https://img.shields.io/github/contributors/jakbin/t-bot)
![GitHub commit activity](https://img.shields.io/github/commit-activity/m/jakbin/t-bot)
![GitHub last commit](https://img.shields.io/github/last-commit/jakbin/t-bot)
![Python 3.6](https://img.shields.io/badge/python-3.6-yellow.svg)
## 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
```sh
pip3 install tl-bot
```
## Usage
```sh
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)
```py
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)
```py
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)
```py
from tl_bot.main import download
download(url, bot_token, chat_id, caption) # all arguments must be str
```
Raw data
{
"_id": null,
"home_page": "https://github.com/jakbin/t-bot",
"name": "tl-bot",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": "",
"keywords": "telegram,t-bot,telegram-api,telegram-api-bot,telegram-file-upload,elegram-upload",
"author": "Jak Bin",
"author_email": "jakbin4747@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/4b/4d/99f14d3e015d7b050316d0ba8da2ed4450bf47a3543ea71e78a168176ecb/tl-bot-0.0.9.tar.gz",
"platform": null,
"description": "# t-bot\n\nUpload files to your Telegram channel or group with your telegram bot\n\n [![PyPI version](https://badge.fury.io/py/tl-bot.svg)](https://pypi.org/project/tl-bot/)\n [![Downloads](https://pepy.tech/badge/tl-bot/month)](https://pepy.tech/project/tl-bot)\n [![Downloads](https://static.pepy.tech/personalized-badge/tl-bot?period=total&units=international_system&left_color=green&right_color=blue&left_text=Total%20Downloads)](https://pepy.tech/project/tl-bot)\n ![GitHub Contributors](https://img.shields.io/github/contributors/jakbin/t-bot)\n ![GitHub commit activity](https://img.shields.io/github/commit-activity/m/jakbin/t-bot)\n ![GitHub last commit](https://img.shields.io/github/last-commit/jakbin/t-bot)\n ![Python 3.6](https://img.shields.io/badge/python-3.6-yellow.svg)\n\n\n## Features\n- Progress bar\n- You can change file name before upload on telegram\n\nNote : Bot can upload only 50 MB file (with default telegram bot api server url)\n\n\n## Installation\n\n```sh\npip3 install tl-bot\n```\n\n## Usage \n```sh\nt-bot setup # setup your telegram credentials\nt-bot reset # reset to default your telegram credentials\nt-bot test # test telegram bot token\nt-bot getid # get chat id of your connected group or channel\nt-bot up {file_name} -c file_caption # upload Telegram channel or group\nt-bot d {url} -c caption # download and upload file to your Telegram channel or group\n```\n\n# API\n\nThe anonfile-upload client is also usable through an API (for test integration, automation, etc)\n\n### tl_bot.main.test_token(bot_token)\n\n```py\nfrom tl_bot.main import test_token\n\ntest_token(bot_token) # bot_token type str\n```\n\n### tl_bot.main.uploader(bot_token: str, chat_id: str, file_name: str, server_url: str, caption: str)\n\n```py\nfrom tl_bot.main import uploader\n\nuploader(bot_token, chat_id, file_name, server_url, caption) # all arguments must be str\n```\n\n### tl_bot.main.download(url:str, bot_token:str, chat_id:str, caption:str)\n\n```py\nfrom tl_bot.main import download\n\ndownload(url, bot_token, chat_id, caption) # all arguments must be str\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "upload files to your telegram channel or group with your telegram bot",
"version": "0.0.9",
"project_urls": {
"Bug Tracker": "https://github.com/jakbin/t-bot/issues",
"Homepage": "https://github.com/jakbin/t-bot"
},
"split_keywords": [
"telegram",
"t-bot",
"telegram-api",
"telegram-api-bot",
"telegram-file-upload",
"elegram-upload"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fe5a5ba1761ffd5815e05f07a4114fd4c439428f9250274674601e4cc9f7ff4c",
"md5": "e71b85385c2af65ded87124ae7921fd9",
"sha256": "8a97b64dd3cf5b36b4acd40f638eca5b3e60027ff7c06820af70957b03b907d7"
},
"downloads": -1,
"filename": "tl_bot-0.0.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e71b85385c2af65ded87124ae7921fd9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3",
"size": 7251,
"upload_time": "2024-01-15T14:22:54",
"upload_time_iso_8601": "2024-01-15T14:22:54.239932Z",
"url": "https://files.pythonhosted.org/packages/fe/5a/5ba1761ffd5815e05f07a4114fd4c439428f9250274674601e4cc9f7ff4c/tl_bot-0.0.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4b4d99f14d3e015d7b050316d0ba8da2ed4450bf47a3543ea71e78a168176ecb",
"md5": "7b8fbd969adc3e31714dc11b22c1b263",
"sha256": "c2056b11ead011d353eca9609e3f3675eaed43f788a0f392eb8e5a43405628cf"
},
"downloads": -1,
"filename": "tl-bot-0.0.9.tar.gz",
"has_sig": false,
"md5_digest": "7b8fbd969adc3e31714dc11b22c1b263",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 6597,
"upload_time": "2024-01-15T14:22:55",
"upload_time_iso_8601": "2024-01-15T14:22:55.299300Z",
"url": "https://files.pythonhosted.org/packages/4b/4d/99f14d3e015d7b050316d0ba8da2ed4450bf47a3543ea71e78a168176ecb/tl-bot-0.0.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-15 14:22:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jakbin",
"github_project": "t-bot",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "tl-bot"
}