PWRTelegram API channel
721 subscribers
12 photos
1 video
7 files
166 links
Official channel for the PWRTelegram bot API.

Installation instructions: https://pwrtelegram.xyz

Creator: @danogentili

Official support group: @pwrtelegramgroup

Italian channel: @pwrtelegramita

Source code: https://github.com/pwrtelegram
Download Telegram
Here I am with an update! @BruhhBot, based on MadelineProto (what this channel is all about), now has some great looking inline buttons! I'm gonna send a screenshot, just so you can see what cool stuff MP can do!
Happy Easter everyone!
AYYYYYYY
I've updated MadelineProto to the latest layer 66: now the new CDN files can be downloaded, and the language code of a user can be fetched (this feature will be very useful for the pwrtelegram API). I've also implemented a new error reporting system with rollbar, that will report all exceptions directly to me!
I'm also working on calls, it'll be something AWESOME!
#UndocumentedAPIChangeOfTheDay
The new CDN file downloading system isn't documented anywhere, so as usual I had to read tdekstop's source code (xd).
It's still a bit buggy, but thanks to rollbar I've already identified the problems.
#UndocumentedAPIChangeOfTheDay
Bots can't execute the help.getNearestDC method with layer 66 anymore, which kinda makes sense since most bot accounts are used from the same datacenter, but then again, a changelog would've been nice.
PWRTelegram API channel
To fetch the language code of a certain user run the getChat method providing the users username or id as parameter, the result will be present in the lang_code field: https://daniil.it/MadelineProto/Chat.html
I've recently pushed a critical MadelineProto bugfix (the datacenter settings weren't synchronized ever since I stopped using references in the datacenter class constructor to avoid problems with threading), now everything should work properly.
I've also seen that certain users are trying to execute the getChat method incorrectly (without providing a bot/user token), please read the official documentation @ pwrtelegram.xyz for info on how to use the API.
#coolmpstuff
MadelineProto is the most powerful mtproto client out there, and can do everything official telegram apps can do, but one of its most awesome features is the ability to stream files directly from telegram to your browser, without storing them in your hard drive!
This can be done easily with one line of code:

$MadelineProto->download_to_stream($file_id, fopen('php://output', 'w'), function ($percent) { flush(); ob_flush(); });

This one liner downloads (without the bot API, it downloads and decrypts the file in real time from telegram!) the given $file_id (that can be an mtproto file id or a bot API file id; both users and bots can use these file ids in MadelineProto, thanks to the built in conversion module!) to php://output (the browser), and every time a chunk is downloaded the callable provided as third parameter is called: as you can see, it accepts a parameter, $percentage: this number is a floating point number that represents the download status, the flush functions are called to send the file to the browser.
You can also resume downloads, by downloading only certain parts of the file: to see how to do that, and for many more examples see the documentation: Daniil.it/MadelineProto
Forwarded from BruhhBot Updates via @groupagreebot
📝 ```Feature Requests```
Post your desired features to the board below. I will take them into account when deciding where to focus development

🕸 0 people have voted so far
Forwarded from BruhhBot Updates via @groupagreebot
📝 Bot Names
I want to rename the bot. Post suggestions for names, and if you really like one duplicate it on the board. The most popular will go into final voting. Anyone submitting inappropriate names will be ignored and you will be banned from this channel. If you like BruhhBot just post BruhhBot as your suggestion

🕸 0 people have voted so far
#madelinecontest: Create a good, useful application using MadelineProto, and it will be shared on every channel and group related to MadelineProto!
Join @pwrtelegramgroup to share ideas and code snippets, and report bugs!
Prove that our society is not as degenerated as it seems, that it can create more than simple flooders and tools of destruction!
The pwrtelegram API can now delete messages (for real!).
To delete a message sent by the bot or any other user in any private chat or group, just use the new deleteMessages method: it accepts two parameters;

chat_id - The id of the chat where to delete the messages
ids - a json array containing the ids of the messages to delete.

This will work for messages sent by other users in groups too, if the bot is admin.
A small example with curl:

curl https://API.pwrtelegram.xyz/bottoken/deleteMessages -F chat_id=-1008382957 -F 'ids=[28374, 28735]'

Join @pwrtelegramgroup for support!