MadelineProto 5.1 introduces several new features aimed at slashing boilerplate and obliterating bugs.
Features:
* Native error reporting: all errors surfacing from the event handler or MadelineProto will be automatically reported to the admin of the bot!
* Support for bot API file IDs with the
sendMedia and download* methods thanks to the new tg-file-decoder library (can also be used standalone!).* Fixes for bot API object conversion, now you can convert MTProto results to bot API objects using the
MTProtoToBotAPI method (and the other way around with BotAPIToMTProto)!Slashing boilerplate!
* Use the new
startAndLoop(EventHandler::class) method to automatically initialize MadelineProto, event handling, error reporting and the event loop, all in a single call!* Use the new
onStart method of the event handler to execute async operations on bot (re)startup!New settings!
* Use the new async updateSettings and getSettings methods to change settings, the old
$MadelineProto->settings behavior is not supported anymore.New download methods: both methods support parallel downloads, resuming and partial downloads, all chosen automatically depending on headers!
* downloadToResponse downloads files to an async http-server: this is perfect for creating file download bots!
* downloadToBrowser downloads files directly to the browser.
Among other internal changes:
*
yield from everything: all internal MadelineProto methods now use yield from for maximum performance!* Packagist install reports! Now all MadelineProto downloads through
madeline.php are reported to packagist!!!! Thank you for 130.000 downloads !!!