mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 17:44:50 +00:00
Fix
This commit is contained in:
parent
cd39f31040
commit
272967bd6c
1 changed files with 15 additions and 5 deletions
|
|
@ -62,10 +62,6 @@ async def start_bot():
|
|||
pass
|
||||
asyncio.create_task(auto_clean())
|
||||
await idle()
|
||||
await app.stop()
|
||||
await user.stop()
|
||||
loop.close()
|
||||
LOGGER.info("[INFO]: Bye!")
|
||||
|
||||
|
||||
home_keyboard_pm = InlineKeyboardMarkup(
|
||||
|
|
@ -337,5 +333,19 @@ General command are:
|
|||
return await client.answer_callback_query(query.id)
|
||||
|
||||
|
||||
async def cleanup():
|
||||
await user.stop()
|
||||
await app.stop()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
loop.run_until_complete(start_bot())
|
||||
try:
|
||||
loop.run_until_complete(start_bot())
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
except Exception as err:
|
||||
logging.error(err.with_traceback(None))
|
||||
finally:
|
||||
loop.run_until_complete(cleanup())
|
||||
loop.stop()
|
||||
print("------------------------ Stopped Services ------------------------")
|
||||
|
|
|
|||
Loading…
Reference in a new issue