if I understood everything correctly, I should have created my handler on an infinite loop with the help of GetChannelDifference
Читать полностью…I've already tried to do it through the handler, but it didn't work out. He did not react to the appearance of a new post in the channel. This problem was not everywhere in some channels everything worked fine
Читать полностью…I tried to do it through the handler, but he did not see the new posts and offered to make his own handler
Читать полностью…Hello, do we have a method to add folders and joins to the channel and its groups?
Читать полностью…phone = 'xxxxxxxxxx'
result = await client.send_code_request(phone)
while True:
try:
code = input('code')
await client.sign_in(phone, code, phone_code_hash=result.phone_code_hash)
except errors.SessionPasswordNeededError:
password = input('password')
await client.check_password(password=password)
break
it`s relate but with doing some other libraries to prevent divulgness of bot using telethon
Читать полностью…That is not related to Telethon. Please move to a different group with the correct topic to continue that conversation
Читать полностью…why do you need concurrent threads? for more performance and etc..
even if you run separate threads together, only one of them is executing at the time, read about GIL
they offered to do this:
ask Telegram, automatic updates aren't reliable for large enough channels for users.
triggering catch_up calls repeatedly after passing it True may or may not improve the frequency, otherwise you'll need to make telethon fetch updates through GetChannelDifference/iter_messages yourself
how to change the session language, for example, in which bots respond with a check mark
Читать полностью…hi all how can i use search_message method even though i`m using client = tdesk.toTelethon(parameters)
because i`m using opentele and opentele doesn`t have any search_message inside the client variable
Please enable logging:
import logging
logging.basicConfig(level=logging.WARNING)
logging.DEBUG
instead.
Читать полностью…
cpu-bound would be best offloaded to a separate process, due to the aforementioned GIL
however when using io-bound libraries that aren't async, threads are ok
in any case asyncio offers ways to use both of these
and this is ultimately not related to telethon
its not about the threads, its about telethon, everything in telethon has been written in pure asyncio, so you better do everything in async/await
telethon.sync is just a trick and not recommended
I run two clients in separate threads
Is it better to run the clients inside the thread as async or as sync?