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
Telegram's next update will include several improvements and new features, like round video messages: thanks to my new bot, @jsondumpbetabot, I've found out that their file ids will have id 13, and I have already added basic support for them in MadelineProto!
https://github.com/danog/MadelineProto/blob/master/src/danog/MadelineProto/TL_botAPI.tl
The next update of the bot API will allow bots to read the language code of users (only if they have already started it, it won't work for forwarded messages); this feature is already present in the pwrtelegram.xyz API: the getChat method will return the language code of the user.
Farsi users may now join the official farsi group: https://t.me/joinchat/AAAAAERlsQpmK-BGZlGZ9A
We also have an international group: @pwrtelegramgroup
An italian group: @pwrtelegramgroupita
And a russian group: @pwrtelegramgrouprus
The PWRTelegram API now runs on a powerful new server with 64 gb of ram, as usual generously offered by flo :3 ❤️❤️❤️
#coolpwrstuff
To obtain the member list of any group/supergroup/channel as a bot, simply run the getChat method as a bot: the parameters are the exactly the ones you must use in the official bot API, for the result see daniil.it/MadelineProto/Chat.html
#coolpwrstuff
To send mentions by user id, even for users that do not have a username, use the following syntax:
https://api.pwrtelegram.xyz/botTOKEN/sendmessage

Parameters:

chat_id=id
text=<a href="mention:101374607">HEY YOU</a>
parse_mode=HTML
mtproto=true
HEY YOU
PWRTelegram API channel
Hello! I've got a lot of features cookin' and I'd like to ask you a question: is there any other feature you want me to add in the next release? Answer by writing to the group @pwrtelegramgroup.
It's been more than a year since I created pwrtelegram, and the above can still be said :D
During this year of activity pwrtelegram has evolved to become s fully fledged telegram client, based on https://Github.com/danog/MadelineProto?v=new
It can now execute mtproto methods (the ones all official clients use to interact with telegram), either as a user, or as a bot (see pwrtelegram.xyz for info on how to do that, and Daniil.it/MadelineProto/API_docs/methods/ for the full method list).
It is being used by a LOT of users, directly through the API or indirectly through the bots using the API.
I'm amazed by the success of this single-dev project.
Thank you all again, for everything.
P.S. I see telegram is testing the deleteMessage method (yet again, copycats xd), but since it isn't working for all bots, I suggest you use the much faster deleteMessages method of the pwrtelegram API, since it can delete up to a billion messages with a single API call (and no, it is not running a foreach loop internally: the mtproto methods used to delete messages already accept an array of message ids, the official bot API is simply, as usual, limiting the power of the MTProto API).
Bugs I found in PHP so far:
https://bugs.php.net/bug.php?id=74545
https://bugs.php.net/bug.php?id=74586

The last bug is also a very serious memory leak :D:
You can now delete service messages with the deleteMessages method!
The new bot API update introduced several awesome features, and they were all automagically integrated into the pwrtelegram bot API.
I'm working on some awesome pwrtelegram improvements for instant views! :DD
MadelineProto was updated!
This release features:

* HUGE performance fixes
* better thread safety
* round videos support
* clickable buttons
* easier settings management, you can now simply edit the settings attribute of the API class to edit the settings!

And much more!
Check out https://daniil.it/MadelineProto for more info!
#coolmpstuff

Here's how you can click buttons using MadelineProto (assuming you have received an http://daniil.it/MadelineProto/API_docs/constructors/updateNewMessage.html or an http://daniil.it/MadelineProto/API_docs/constructors/updateNewChannelMessage.html and that the reply_markup contains a valid keyboard)

$result = $Update['message']['reply_markup']['rows'][$row_number]['buttons'][$button_number]->click()




$result can be one of the following:

A string - If the button is a keyboardButtonUrl

Updates - If the button is a keyboardButton, the message will be sent to the chat, in reply to the message with the keyboard

messages_BotCallbackAnswer - If the button is a keyboardButtonCallback or a keyboardButtonGame the button will be pressed and the result will be returned

false - If the button is an unsupported button, like keyboardButtonRequestPhone, keyboardButtonRequestGeoLocation, keyboardButtonSwitchInlinekeyboardButtonBuy; you will have to parse data from these buttons manually