Nekmo / telegram-upload

Upload and download files from Telegram up to 4 GiB using your account
MIT License
1.06k stars 233 forks source link

Support bot accounts #200

Open Nekmo opened 1 year ago

tissole commented 1 year ago

In your description, you say, Bot tokens can not be used with this program (bot uploads are limited to 50MB).From my understanding, your script uses telethon under the hood, which is based on MTProto, not Bot API. Using Telethon with bot accounts (bot tokens) doesn't seem to be limited to 50 MB files, the limits are 2 GB for free users and 4 GB for premium users.

From Telethon Docs: Both official applications and third-party clients (like your own applications) logged in as EITHER USER OR BOTS can use MTProto to communicate directly with Telegram’s API (which is not the HTTP bot API).

MTProto vs. HTTP Bot API Using BotAPI, it has a maximum limit of 20MiB for downloading and 50MiB for uploading. Telethon has no such of limitations, you can upload and download files up to 2GiB.