the bot is ready
Browse files- App/app.py +3 -3
App/app.py
CHANGED
@@ -44,7 +44,7 @@ def authjwt_exception_handler(request: Request, exc: AuthJWTException):
|
|
44 |
|
45 |
@app.on_event("startup")
|
46 |
async def startup_event():
|
47 |
-
|
48 |
# await upload_bot.start()
|
49 |
# await models.create_all()
|
50 |
|
@@ -56,8 +56,8 @@ async def startup_event():
|
|
56 |
|
57 |
@app.on_event("shutdown")
|
58 |
async def shutdown_event():
|
59 |
-
|
60 |
-
|
61 |
|
62 |
# await upload_bot.stop()
|
63 |
if not database.is_connected:
|
|
|
44 |
|
45 |
@app.on_event("startup")
|
46 |
async def startup_event():
|
47 |
+
await bot.start(bot_token="6183919505:AAEhHFt4mI18bQeAf2Lj7AePXFRPVLrOFM8")
|
48 |
# await upload_bot.start()
|
49 |
# await models.create_all()
|
50 |
|
|
|
56 |
|
57 |
@app.on_event("shutdown")
|
58 |
async def shutdown_event():
|
59 |
+
await bot.session.save()
|
60 |
+
await bot.disconnect()
|
61 |
|
62 |
# await upload_bot.stop()
|
63 |
if not database.is_connected:
|