danog/madelineproto ? reverse-engineered prompt

Reverse engineered prompt

Build me a PHP library for talking to Telegram directly through MTProto, not the Bot API, and make it fully async. I want it to let me log in with either a phone number or a bot token, send and receive messages, join channels, handle updates in real time, and support things like secret chats, inline bots, file uploads and downloads, stickers, proxies, and voice or video call related features if possible.

It should be easy to use from a simple PHP script, with a clear getting started example, good error handling, and a way to keep a session saved between runs. Please include examples for a normal user account and a bot, plus basic tests and documentation so someone can actually run it without guessing. If you need to check current Telegram or PHP async docs online while building it, go ahead.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab