E
Size: a a a
E
БГ
JK
File "C:\Users\boyar\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 642, in get_event_loop
raise RuntimeError('There is no current event loop in thread %r.'
RuntimeError: There is no current event loop in thread 'Thread-1'.
C:\Users\boyar\AppData\Local\Programs\Python\Python39\lib\threading.py:956: RuntimeWarning: coroutine 'MessageMethods.send_message' was never awaited
self._invoke_excepthook(self)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
loop =asyncio.new_event_loop()
asyncio.set_event_loop(loop)
from telethon import TelegramClient, sync
from threading import Thread
...
bot = TelegramClient('bot', api_id, api_hash).start(bot_token=bot_token)
bot.start()
def autoposting():
bot.send_message(int(admin_id),message="1")
def checking():
pass
thread1 = Thread(target=autoposting)
thread2 = Thread(target=checking)
thread1.start()
thread2.start()
thread1.join()
thread2.join()
I
File "C:\Users\boyar\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 642, in get_event_loop
raise RuntimeError('There is no current event loop in thread %r.'
RuntimeError: There is no current event loop in thread 'Thread-1'.
C:\Users\boyar\AppData\Local\Programs\Python\Python39\lib\threading.py:956: RuntimeWarning: coroutine 'MessageMethods.send_message' was never awaited
self._invoke_excepthook(self)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
loop =asyncio.new_event_loop()
asyncio.set_event_loop(loop)
from telethon import TelegramClient, sync
from threading import Thread
...
bot = TelegramClient('bot', api_id, api_hash).start(bot_token=bot_token)
bot.start()
def autoposting():
bot.send_message(int(admin_id),message="1")
def checking():
pass
thread1 = Thread(target=autoposting)
thread2 = Thread(target=checking)
thread1.start()
thread2.start()
thread1.join()
thread2.join()
JK
File "C:\Users\boyar\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 642, in get_event_loop
raise RuntimeError('There is no current event loop in thread %r.'
RuntimeError: There is no current event loop in thread 'Thread-1'.
C:\Users\boyar\AppData\Local\Programs\Python\Python39\lib\threading.py:956: RuntimeWarning: coroutine 'MessageMethods.send_message' was never awaited
self._invoke_excepthook(self)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
loop =asyncio.new_event_loop()
asyncio.set_event_loop(loop)
from telethon import TelegramClient, sync
from threading import Thread
...
bot = TelegramClient('bot', api_id, api_hash).start(bot_token=bot_token)
bot.start()
def autoposting():
bot.send_message(int(admin_id),message="1")
def checking():
pass
thread1 = Thread(target=autoposting)
thread2 = Thread(target=checking)
thread1.start()
thread2.start()
thread1.join()
thread2.join()
ᅠ
File "C:\Users\boyar\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 642, in get_event_loop
raise RuntimeError('There is no current event loop in thread %r.'
RuntimeError: There is no current event loop in thread 'Thread-1'.
C:\Users\boyar\AppData\Local\Programs\Python\Python39\lib\threading.py:956: RuntimeWarning: coroutine 'MessageMethods.send_message' was never awaited
self._invoke_excepthook(self)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
loop =asyncio.new_event_loop()
asyncio.set_event_loop(loop)
from telethon import TelegramClient, sync
from threading import Thread
...
bot = TelegramClient('bot', api_id, api_hash).start(bot_token=bot_token)
bot.start()
def autoposting():
bot.send_message(int(admin_id),message="1")
def checking():
pass
thread1 = Thread(target=autoposting)
thread2 = Thread(target=checking)
thread1.start()
thread2.start()
thread1.join()
thread2.join()
ᅠ
bot = TelegramClient('bot', api_id, api_hash).start(bot_token=bot_token)
bot.start()
JK
bot = TelegramClient('bot', api_id, api_hash).start(bot_token=bot_token)
bot.start()
ᅠ
ᅠ
from telethon.sync import TelegramClient, events
...ᅠ
JK
JK
from telethon.sync import TelegramClient, events
...ᅠ
R3
ᅠ
R3
R3
ᅠ
ᅠ