telethonchat | Unsorted

Telegram-канал telethonchat - Telethon Chat

6097

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's not an error. make new client instance if it fails and start it cleanly

as for why it disconnects, you'll have to ask that to Telegram or it's complication by your software and python

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

Telethon Chat

yes it has auto_reconnect param, let me try it

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

Telethon Chat

›› 505821

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

Telethon Chat

You can see what arguments TelegramClient has

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

Telethon Chat

then you aren't allowed to get full user details

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

Telethon Chat

Documentation for get_entity

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

Telethon Chat

How to get full user details by userid

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

Telethon Chat

Documentation for delete_dialog

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

Telethon Chat

so you have bot and need to create bot using it

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

Telethon Chat

nothing built-in. you have to implement polling yourself with GetChannelDifference

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

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.

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

Telethon Chat

If the answer is yes, are we able to handle updates of a large number of public chats this way?

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

Telethon Chat

you'll have to ask Telegram to implement that

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

Telethon Chat

await client.get_input_entity(user_id)

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

Telethon Chat

/channel/TelethonChat/618825

types.InputInvoiceStarGiftUpgrade

functions.payments.GetPaymentFormRequest
functions.payments.SendStarsFormRequest

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

Telethon Chat

new error is coming

ERROR:telethon.network.mtprotosender:Automatic reconnection failed 0 time(s)

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

Telethon Chat

But we can get by resolvephonerequest

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

Telethon Chat

Could not find the input entity for PeerUser(user_id=1154431484) (PeerUser). Please read https://docs.telethon.dev/en/stable/concepts/entities.html to find out more details.

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

Telethon Chat

how to disable reconnects

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

Telethon Chat

Could not find the input entity

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

Telethon Chat

it's a you problem, don't use many sessions, reconnects and freezes can lead to sync issues

edit the library or patch the client._sender._state.id and disable reconnects

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

Telethon Chat

Hey, I am facing this error since 1 month, tried to solve but no success

telethon.network.mtprotosender - WARNING - Security error while unpacking a received message: Server replied with a wrong session ID (see FAQ for details)


I am running almost 500 telethon clients and they are stored in an array. All clients have been joined 10 same channels, those channels put post very frequently like 20 per minute. As this happens my console get filled with this error.

Please somebody help this is now very frustrating for me!

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

Telethon Chat

How to delete a chat only for me

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

Telethon Chat

Documentation for edit_2fa

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

Telethon Chat

which part of "channel_post_id'' made you think it wants a "discussion channel" message id?

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

Telethon Chat

hey! can someone pls help with fetching the comments for a post from a main channel. because the code that is in this channel

async for comment in client.iter_messages(channel, reply_to=channel_post_id):
if comment.sender_id == ...:
await comment.reply(...)
break

requires u to know to id of the post in the discussion channel. is there a way to obtain an id for a post in a discussion channel using its id in the main channel ? or maybe there is a way to extract comments without interacting with the discussion channel. I saw some information about getting a thread for this (the code below) but i get an error "'Message' object has no attribute 'can_get_message_thread'" and i cannot find any info that would make sense in the documentation (( would be glad to heat any suggestions
post_message = await client.get_messages(channel_username, ids=message.id)
if post_message.can_get_message_thread:
thread = await client.get_message_thread(channel_username, message_id=post_message.id)
comments = await client.get_messages(thread, limit=100)

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

Telethon Chat

Can we recieve updates of a public group of which we're not a member?

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

Telethon Chat

Hello, can you tell me if you can add a bot to a video call in a group rather than a bot user?

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

Telethon Chat

invoice = InputInvoiceStarGift(user_id=user_id, gift_id=gift.id)
form_info = await client(functions.payments.GetPaymentFormRequest(invoice=invoice))


An error occurred: a TLObject was expected but found something else
Error type: <class 'TypeError'>
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/telethon/tl/tlobject.py", line 194, in __bytes__
return self._bytes()
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/telethon/tl/functions/payments.py", line 625, in _bytes
self.invoice._bytes(),
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/telethon/tl/types/__init__.py", line 13778, in _bytes
self.user_id._bytes(),
^^^^^^^^^^^^^^^^^^^
AttributeError: 'int' object has no attribute '_bytes'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/gifts/bot.py", line 42, in buy_gift
form_info = await client(functions.payments.GetPaymentFormRequest(invoice=invoice))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/telethon/client/users.py", line 30, in __call__
return await self._call(self._sender, request, ordered=ordered)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/telethon/client/users.py", line 67, in _call
future = sender.send(request, ordered=ordered)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/telethon/network/mtprotosender.py", line 183, in send
state = RequestState(request)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/telethon/network/requeststate.py", line 17, in __init__
self.data = bytes(request)
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/telethon/tl/tlobject.py", line 200, in __bytes__
raise TypeError('a TLObject was expected but found something else')
TypeError: a TLObject was expected but found something else

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

Telethon Chat

Is it possible to use telethon to upgrade telegram gifts?

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