Update __main__.py

This commit is contained in:
yasirarism 2023-01-09 08:28:21 +07:00 committed by GitHub
parent 9001d0846b
commit 2602fe7689
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -338,6 +338,9 @@ General command are:
return await client.answer_callback_query(query.id)
async def cleanup():
await app.stop()
await user.stop()
if __name__ == "__main__":
try:
@ -347,5 +350,6 @@ if __name__ == "__main__":
except Exception as err:
LOGGER.error(err.with_traceback(None))
finally:
loop.run_until_complete(cleanup())
loop.stop()
print("------------------------ Stopped Services ------------------------")