MTProto clients (like Telethon) connect directly to Telegram’s servers, which means there is no HTTP connection, no “polling” or “web hooks”. This means less overhead, since the protocol used between you and the server is much more compact than HTTP requests with responses in wasteful JSON.
Since there is a direct connection to Telegram’s servers, even if their Bot API endpoint is down, you can still have connection to Telegram directly.
Using a MTProto client, you are also not limited to the public API that they expose, and instead, you have full control of what your bot can do. Telethon offers you all the power with often much easier usage than any of the available Python Bot API wrappers.
If your application ever needs user features because bots cannot do certain things, you will be able to easily login as a user and even keep your bot without having to learn a new library.
If less overhead and full control didn’t convince you to use Telethon yet, check out the wiki page MTProto vs HTTP Bot API with a more exhaustive and up-to-date list of differences.
0 条评论