azils3 commited on
Commit
6c1f56a
·
verified ·
1 Parent(s): 52a623c

Update fastapi_app.py

Browse files
Files changed (1) hide show
  1. fastapi_app.py +0 -20
fastapi_app.py CHANGED
@@ -838,26 +838,6 @@ async def send_poll_endpoint(chat_id: int, question: str, options: list, is_anon
838
  return {"message_id": message.id}
839
 
840
 
841
- @app.post("/send_chat_action")
842
- async def send_chat_action_endpoint(chat_id: int, action: str):
843
- actions = {
844
- "typing": enums.ChatAction.TYPING,
845
- "upload_photo": enums.ChatAction.UPLOAD_PHOTO,
846
- "record_video": enums.ChatAction.RECORD_VIDEO,
847
- "upload_video": enums.ChatAction.UPLOAD_VIDEO,
848
- "record_voice": enums.ChatAction.RECORD_VOICE,
849
- "upload_voice": enums.ChatAction.UPLOAD_VOICE,
850
- "upload_document": enums.ChatAction.UPLOAD_DOCUMENT,
851
- "find_location": enums.ChatAction.FIND_LOCATION,
852
- "record_video_note": enums.ChatAction.RECORD_VIDEO_NOTE,
853
- "upload_video_note": enums.ChatAction.UPLOAD_VIDEO_NOTE,
854
- "playing": enums.ChatAction.PLAYING
855
- }
856
- action_enum = actions.get(action)
857
- if not action_enum:
858
- return {"error": "Invalid action"}
859
- await bot_instance.send_chat_action(chat_id, action_enum)
860
- return {"status": "Chat action sent successfully"}
861
 
862
  @app.post("/create_chat_invite_link")
863
  async def create_chat_invite_link_endpoint(chat_id: int, name: str = None, expire_date: int = None, member_limit: int = None, creates_join_request: bool = False):
 
838
  return {"message_id": message.id}
839
 
840
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
841
 
842
  @app.post("/create_chat_invite_link")
843
  async def create_chat_invite_link_endpoint(chat_id: int, name: str = None, expire_date: int = None, member_limit: int = None, creates_join_request: bool = False):