2022-04-07 03:57:09 +00:00
|
|
|
from pyrogram.methods.utilities.idle import idle
|
|
|
|
|
2022-04-06 14:39:27 +00:00
|
|
|
from core import app
|
|
|
|
from tools.initializer import init_logger
|
2022-04-07 03:57:09 +00:00
|
|
|
from tools.sessions import session
|
|
|
|
|
|
|
|
|
|
|
|
async def main():
|
|
|
|
try:
|
|
|
|
init_logger()
|
|
|
|
await app.start()
|
|
|
|
await idle()
|
|
|
|
finally:
|
|
|
|
await session.close()
|
|
|
|
await app.stop()
|
|
|
|
|
2022-04-06 14:39:27 +00:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2022-04-07 03:57:09 +00:00
|
|
|
app.run(main())
|