attendantelectro commited on
Commit
5629318
·
verified ·
1 Parent(s): a656748

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -14,6 +14,16 @@ dispatcher.add_handler(MessageHandler(Filters.text & ~Filters.command, handle_me
14
 
15
  app = FastAPI()
16
 
 
 
 
 
 
 
 
 
 
 
17
  @app.post("/webhook")
18
  async def webhook(request: Request):
19
  update = Update.de_json(await request.json(), bot)
 
14
 
15
  app = FastAPI()
16
 
17
+ # --- این بخش جدید اضافه شده است ---
18
+ @app.get("/")
19
+ async def root():
20
+ """
21
+ این مسیر برای پاسخ به درخواست‌های Health Check است
22
+ تا خطای 404 در لاگ‌ها ایجاد نشود.
23
+ """
24
+ return {"status": "running", "message": "Bot is active!"}
25
+ # ---------------------------------
26
+
27
  @app.post("/webhook")
28
  async def webhook(request: Request):
29
  update = Update.de_json(await request.json(), bot)