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.
Читать полностью…Unfortunately, telegram patched that bug, but you can still delete messages in private chats and groups (not supergroups)!
Читать полностью…How did I accomplish this you may ask?
I simply used my MTProto client, Daniil.it/MadelineProto: with it you can do EVERYTHING (and I mean EVERYTHING, even create secret chats and make phone calls) official clients can do, from a simple script!
#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!
#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
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
Читать полностью…#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.
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!
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!
Читать полностью…Check out my channel @BruhhBotUpdates to keep up to date on BruhhBot-Madeline and it's progression to the top of Telegram group management!
Читать полностью…Telegram has changed bot API file ids of gifs, they have now id 10: https://github.com/danog/MadelineProto/blob/master/src/danog/MadelineProto/TL_botAPI.tl
Читать полностью…I present to you my latest project, pack.sh!
This is a small sourceable bash script that can be used to convert numbers to base256 (binary) format.
This project will be used to create an MTProto client in bash called mtproto.sh.
http://daniil.it/pack.sh/
⚠️ Security Advice⚠️
Dear users. You might have already heard that calls are coming to Telegram (check @tgbeta for more information) in the near future. Yesterday the Telegram team released some more technical information about calls which confirmed: Call data can be either routed via telegrams servers or directly sent to your peer (peer-to-peer concept).
In other words: With calls, your IP address might get revealed to to the caller.
What to do about this:
+ As soon as possible, go to your privacy settings and adjust the calls section.
+ Don't take calls from unknown users / persons you don't trust to know your IP.
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 pwrtelegram API is now extremely fast and won't be down anymore!
You can safely implement it into your bots now :D
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!
📝 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
📝 ```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
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.
It seems that telegram has only recently (6 pm US/Pacific Ocean time) enabled CDN downloads, that probably means that they will be released soon!
Читать полностью…#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.
Hey everyone!
I'm here to help out a friend, @romanTG, with his project: tsear.ch is an awesome telegram search engine based on MadelineProto, but is currently endangered by lack of funds; you can help simply by ordering some advertisements on the website for your channel/project: they have excellent advertisement places!
You can also help out just by donating, contact @romanTG for info!
🗳 How are you enjoying BruhhBot?
It's quite nice! Userbot master race! 👍 [8]
I know how to use it, but I don't like it as well as I do other bots 👎 [4]
I can't figure out how to use it, so I can't say whether I like it or not [0]
👥 12 people have voted so far
I've pushed some commits to MadelineProto that fix bugs in secret chats, and add support for voice calls key generation.
Читать полностью…Of course, this is paranoia.
But still, when I implement calls in MadelineProto (and I am doing it now), by default calls will be accepted only if a udp reflector can be used (alias MadelineProto won't be able to see your IP).
(This is by default, if you really want to accept p2p calls there will be an option for that).