There's one made by Iranians where you can move to if you think you'll be more cozy, and it's offtopic though
Читать полностью…bro they should change the group name to Telethon IR
it's crazy how many Persians are here💀the admins should learn farsi fr bro
like the last 20 msgs are all persians
Hello guys
If I want to write a script using Telethon that keeps my account active and always online, showing the "online" status to everyone, could this lead to the deletion of my account?
Just don't drift around the main goal, what are you intending
telethon is south of normal as of V1, but everything has a coping version of a solution
stickers are special case for users and allowed to have no file_reference for most sticker types. the rest media types are only allowed for bots to be stored in a guaranteed way, for users, it's much more performant to pass an object in memory, since they're short-lived
if it's RAM you're worried about, you can use telethon.utils.get_input_media(message.media) to get more minimal object meant for sending
otherwise if you're passing the object to other processes or keeping them unstably over restarts, it's needed to go the manual way for no bots by pickling + base64
storing isn't for users but bots. it will expire within couple hours anyways, just pass the object in memory.
Читать полностью…you misunderstood what's the function for, that meant you have a file_id of other libraries, and to pass that bot-api style "string" file_id to get telethon object.
The int document id from telethon itself can't be used alone, it needs access hash too. you already have access to binary interface with telethon, storing object is trivially easy.
if you still don't want to, telethon's message.file.id still works for documents, stickers are documents too
you can flex tape fix it for photos too, put this line at top:telethon.types.PhotoSize.location = type('', (int,), {"__getattr__": lambda s, _: s})()
hello. when adding sessions (working sessions) the code asks for authorization (Please enter your phone (or bot token)). adding one session at a time manually is not an option because I need to work with hundreds of sessions.
Читать полностью…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.
That is not related to Telethon. Please move to a different group with the correct topic to continue that conversation
Читать полностью…I did the same thing for entire 2 months and I haven't been getting any limitation or banned
Читать полностью…Actually I'm not worried about anything, but I'm trying to use the best way...
I exceptionally think if I could be able use a not long integer, then users could either, so it will give me some opportunity to make some options for them and not just storing, I saw pyrogram library which is outdated by 3 years ago can re-use all types of files or medias just using an as not long integer as document.id's of telethon , which was completely interesting,
Btw I don't think so using this trash library shall make my code cleaner , it shan't remain my code clean as well, but about Telegram http-api?
It worked alright with stickers, but after that I tried to use a video file_id, when I used to pass the returned InputDocument object and after calling the function, it occurred to
FileReferenceEmptyError: The file reference must exist to access the media and it cannot be empty (caused by SendMediaRequest)Читать полностью…
if it raises "NotParticipantError". it means that the user is not a member of your channel. you can except the error.
Читать полностью…Your code didn't work actually,
It occurred a BufferError with below traceback:
File "<string>", line 7, in file_id_to_object
File "/home/orDuncan/.local/lib/python3.8/site-packages/telethon/extensions/binaryreader.py", line 37, in read_int
return int.from_bytes(self.read(4), byteorder='little', signed=signed)
File "/home/orDuncan/.local/lib/python3.8/site-packages/telethon/extensions/binaryreader.py", line 60, in read
raise BufferError(
BufferError: No more data left to read (need 4, got 0: b''); last read None