Official Telethon's chat! Rules: • Speak English • Stay on topic (questions about Telethon) • Be respectful • Don't ask to ask • Spam-related uses lead to ban • Read https://docs.telethon.dev before asking things here Read more about us @TelethonUpdates
how to enable auto delete messages for a month in chat? what method?
Читать полностью…Hi,
I do global search using:
client.iter_messages(None, search=query)
filter=InputMessagesFilterVideo
filter=InputMessagesFilterDocument
Of course. .cpp one belongs is older than layer 66, telethon is correct one
as i mentioned Telegram android is a mess. tlrpc has duplicate classes from previous layers, jni cpp parts redefines all of the objects connection objects and uses some ancient constructor
create your own layer file based on whatever telegram android wants from older schemas and put them in same format with _LayerN
1 constructor is the one that my app is using, here you can find it in telegram's code
https://github.com/DrKLO/Telegram/blob/eee720ef5e48e1c434f4c5a83698dc4ada34aaa9/TMessagesProj/jni/tgnet/ApiScheme.h#L177
2 constructor is the one that telethon has
3 constructor is just screenshot of telethon's constructor (constructor number 2) from android app, here it is in telegram's code
https://github.com/DrKLO/Telegram/blob/eee720ef5e48e1c434f4c5a83698dc4ada34aaa9/TMessagesProj/src/main/java/org/telegram/tgnet/tl/TL_account.java#L852
do you mean that these 2 constructors are the same but from different versions?
the user likely stopped your bot. track them properly
using events.Raw(types.UpdateBotStopped, func=lambda e: e.stopped)
my client is sending an object with id 637ea878, which is TL_account_registerDevice
telethon doesnt have this object
telethon's object for TL_account_registerDevice has constructor 0xec86017a and is completely different object
what would you suggest for me in this situation? I am just unable to read some messages because telethon just doesnt have some constructors
also right here
https://raw.githubusercontent.com/LonamiWebs/Telethon/7802fe5487404e3a97848f1ba9226d2c43dc2a54/scheme.tl
you can see that telethon used to have this object, but now it doesnt
a photo can't be a document result, as the name suggests
as i mentioned, you can't put a title or description to a photo result in telethon
It won't. and try reading which constructors don't exist, there is 431 duplicate _layerN suffix objects. it's for backwards compatibility with stored bytes in database, Telegram Android is a mess
Читать полностью…this way can only get the admins,not all the users
Читать полностью…for
InputMessagesFilterVideo,
You can't. make separate request for document ones and match locally by message.file.ext / .mime_type and narrow it down by search='.mp4'
Читать полностью…The suggestion is how Telegram operates, your bots should handle all the events relevant to it and remove invalidated users.
blocked means explicit block rather than deleting all history with PeerIdInvalid
I'm also getting the "User is blocked" error, and your suggestion seems a bit unreasonable for 60000 users.
Читать полностью…same as any other event, handle events.NewMessage and so SendReaction on the event.id
Читать полностью…You'll have to ask your telegram app why it's stuck in version 4.9.0 from 2018, The two constructors are equal in your screenshot
Читать полностью…An invalid Peer was used. Make sure to pass the right peer type and that the value is valid (for instance, bots cannot start conversations) (caused by SendMessageRequest)
Читать полностью…if I change telethon_generator/data/api.tl to .tl file from android app will it work? will it autogenerate constructors for telegram on android? if yes where can I find .tl schema for android telegram? because I cant really find it in source code
Читать полностью…hi guys, why does not telethon implement all constructors?
there are 593 constructors that do not exist in telethon but exist in telegram
layer in both telegram and telethon is 198, telegram v11.7.0 (5663)
its telethon from latest version until update to layer 199 (https://github.com/LonamiWebs/Telethon/commit/1cb5ff1dd54ecfad41711fc5a4ecf36d2ad8eaf6)
Do you know someone who handles people's reports on Telegram very quickly?
Читать полностью…Hi and welcome to the group. Before asking any questions, please read the rules from the group's description, and don't forget to read the docs. Make sure you are using the latest version with pip3 install -U telethon
, since most problems have already been fixed in newer versions.