Answer the question
In order to leave comments, you need to log in
Decorator not working for getting telethon messages?
Hello !
from telethon.sync import TelegramClient, events
from time import sleep
api_id = 0000000
api_hash = "0000"#Таки да, тут были токены
client = TelegramClient(str(api_id), api_id, api_hash)
client.start()
@client.on(events.NewMessage)
def normal_handler(event):
print(event)
def main():
sleep(60)
if __name__ == '__main__':
main()
Answer the question
In order to leave comments, you need to log in
So you yourself sent the script to the slip. Well, you launch the client ahead of time
sleep(60)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question