telethonchat | Unsorted

Telegram-канал telethonchat - Telethon Chat

6095

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

Subscribe to a channel

Telethon Chat

it will get admins and users if they isn't hidden

Читать полностью…

Telethon Chat

await client.get_participants(chat)

Читать полностью…

Telethon Chat

use only english here

Читать полностью…

Telethon Chat

how to enable auto delete messages for a month in chat? what method?

Читать полностью…

Telethon Chat

Hi,

I do global search using:

client.iter_messages(None, search=query)


I want to get only messages of regular videos, or files but that are videos.
How can I do that?

If I use
filter=InputMessagesFilterVideo

- I get regular videos only

If I use
filter=InputMessagesFilterDocument

, I lose regular videos, and get only files, but it also find subtitles .srt files, and not videos-only files

Читать полностью…

Telethon Chat

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

Читать полностью…

Telethon Chat

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?

Читать полностью…

Telethon Chat

the user likely stopped your bot. track them properly

using events.Raw(types.UpdateBotStopped, func=lambda e: e.stopped)

Читать полностью…

Telethon Chat

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

Читать полностью…

Telethon Chat

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

Читать полностью…

Telethon Chat

TL Reference for SetAccountTTL

Читать полностью…

Telethon Chat

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

Читать полностью…

Telethon Chat

telethon gets its layer from tdesktop

Читать полностью…

Telethon Chat

i think that's not related to telethon, isn't it?

Читать полностью…

Telethon Chat

Who can give explanations about telegram reports?

Читать полностью…

Telethon Chat

this way can only get the admins,not all the users

Читать полностью…

Telethon Chat

Hi, Can I tell if a user is in a group?

Читать полностью…

Telethon Chat

for

InputMessagesFilterVideo
,

I don't need to do anything else right? only use file extensions / mime_type filter for Filter document?

Читать полностью…

Telethon Chat

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'

Читать полностью…

Telethon Chat

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

Читать полностью…

Telethon Chat

I'm also getting the "User is blocked" error, and your suggestion seems a bit unreasonable for 60000 users.

Читать полностью…

Telethon Chat

same as any other event, handle events.NewMessage and so SendReaction on the event.id

Читать полностью…

Telethon Chat

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

Читать полностью…

Telethon Chat

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)

Читать полностью…

Telethon Chat

depends on your errors

Читать полностью…

Telethon Chat

TL Reference for SetPrivacy

Читать полностью…

Telethon Chat

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

Читать полностью…

Telethon Chat

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)

Читать полностью…

Telethon Chat

Do you know someone who handles people's reports on Telegram very quickly?

Читать полностью…

Telethon Chat

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.

Читать полностью…
Subscribe to a channel