Разработан чат-бот
This commit is contained in:
26
main.py
Normal file
26
main.py
Normal file
@ -0,0 +1,26 @@
|
||||
import asyncio
|
||||
from aiogram import executor
|
||||
import platform
|
||||
from threading import Thread
|
||||
|
||||
from bot import dispatcher
|
||||
import ai
|
||||
|
||||
|
||||
if platform.system() == 'Windows':
|
||||
asyncio.set_event_loop_policy(
|
||||
asyncio.WindowsSelectorEventLoopPolicy(),
|
||||
)
|
||||
|
||||
update_statistics_thread = Thread(
|
||||
target=ai.update_statistics,
|
||||
daemon=True,
|
||||
)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
update_statistics_thread.start()
|
||||
executor.start_polling(
|
||||
dispatcher,
|
||||
skip_updates=True,
|
||||
)
|
Reference in New Issue
Block a user