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 restore some TLObject after storing obj.to_json() ?
Читать полностью…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
either make your other Python file async or communicate in different ways using asyncio tools
Читать полностью…Hello, please tell me how to correctly implement the function of getting a list of users so that it can be called from another code file?
Читать полностью…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)
Читать полностью…