Implement TelegramCommandHandler core structure #61

Closed
opened 2026-02-05 13:41:12 +09:00 by agentson · 0 comments
Collaborator

목표

TelegramCommandHandler 클래스의 핵심 구조 구현

세부사항

  • Long polling으로 Telegram getUpdates API 호출
  • 명령어 파싱 및 라우팅 로직
  • 명령어 핸들러 등록 메커니즘
  • Chat ID 검증으로 보안 강화
  • 에러 격리 (명령 처리 실패가 거래 루프에 영향 없음)

구현 내용

  • TelegramCommandHandler 클래스
  • register_command(command, handler) 메서드
  • start_polling() / stop_polling() 메서드
  • _poll_loop() - getUpdates 호출 루프
  • _handle_update() - 명령어 파싱 및 디스패칭
  • Chat ID 검증 로직

체크리스트

  • TelegramCommandHandler 클래스 구현
  • Long polling 구조 구현
  • 명령어 등록/라우팅 로직
  • Chat ID 보안 검증
  • 테스트 추가 (tests/test_telegram_commands.py)
  • 커버리지 80% 이상 유지

의존성

  • Depends on #59 (send_message method)

관련 이슈

Part of Telegram bidirectional command feature implementation

## 목표 TelegramCommandHandler 클래스의 핵심 구조 구현 ## 세부사항 - Long polling으로 Telegram getUpdates API 호출 - 명령어 파싱 및 라우팅 로직 - 명령어 핸들러 등록 메커니즘 - Chat ID 검증으로 보안 강화 - 에러 격리 (명령 처리 실패가 거래 루프에 영향 없음) ## 구현 내용 - TelegramCommandHandler 클래스 - register_command(command, handler) 메서드 - start_polling() / stop_polling() 메서드 - _poll_loop() - getUpdates 호출 루프 - _handle_update() - 명령어 파싱 및 디스패칭 - Chat ID 검증 로직 ## 체크리스트 - [ ] TelegramCommandHandler 클래스 구현 - [ ] Long polling 구조 구현 - [ ] 명령어 등록/라우팅 로직 - [ ] Chat ID 보안 검증 - [ ] 테스트 추가 (tests/test_telegram_commands.py) - [ ] 커버리지 80% 이상 유지 ## 의존성 - Depends on #59 (send_message method) ## 관련 이슈 Part of Telegram bidirectional command feature implementation
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jihoson/The-Ouroboros#61