Skip to main content

All Questions

0 votes
2 answers
521 views

I can't understand what's wrong with my loop/asyncio when trying to run a telethon script

I can't understand what's wrong with my loop/asyncio when trying to run a telethon script I've tried multiple approaches, but I constatly get errors when trying to run the client with asyncio - so ...
user28854634's user avatar
0 votes
0 answers
76 views

Security error while unpacking a received message: Server replied with a wrong session ID (see FAQ for details)

i was trying to solve this problem in telethon from a few days , when i run this code @client.on(events.NewMessage(chats=channel_to_listen())) async def all_messages_handler(event): run(event.raw_text)...
mounir aithamadi's user avatar
0 votes
1 answer
95 views

How to use context variables correctly in Telethon?

I'm developing a Telegram bot using the Telethon library. I want to pass the value of tags_cv from send_tag_list() to show_selected_tags(). But I get this error: `ERROR - Unhandled exception on ...
Kozorez-V's user avatar
0 votes
1 answer
581 views

continuing outer loop of asyncio python

I want to continue my outer loop but in async function it looks like, when the task completed program will stop. this is piece of my code I want to do something in main every 50 seconds and then call ...
Mohamad Sh's user avatar
0 votes
1 answer
558 views

python decorators in asyncio event listener with Telethon

Every time a message is sent to the channel the handler function will be called because of the python decorator. I want to to both recieve messages and print them out. This is how i imagined the ...
Soma Juice's user avatar
1 vote
4 answers
2k views

How to use same telethon client with same session many times

I have this Telethon code: from telethon import TelegramClient import asyncio api_id = "" api_hash = "" session = "john" username = 'Hello_World' # For Example async ...
Othman Alkhatib's user avatar
0 votes
1 answer
217 views

Telethon send messages in list in asynchronous manner

Sorry for any broken english... So, basically, I have a list containing messages and their destinies: messages = [(id_1, msg_1), (id_2, msg_2), (id_3, msg_3),] What I want is to use a: async for msg ...
Joao Pedro Lourenco Affonso's user avatar
1 vote
1 answer
429 views

How to take input from one function and use it to make a coroutine?

I have one function (func1) which checks if an event happened. And if event happened , run another function asynchronous. and again repeat the same.. . (I might not have explained it vary well, so ...
Mayank's user avatar
  • 81