5b1634ebca024c63b1cb9bb94bf861807fd97e1a
Refactor commands.py to be thin Telegram wrappers around core services. Changes: - Replace 'import storage' with imports from core.services and adapters.storage - Create module-level service instances (BountyService, TrackingService) - Update format_bounty() to work with Bounty dataclass instead of dict - Add get_room_id() helper for unified group/DM handling - Each command handler is now a thin wrapper that: 1. Extracts Telegram types (update, user_id, room_id) 2. Calls appropriate core service 3. Formats and sends response Kept from original: - parse_args() - format_bounty() - extract_args() Commands now use services: - cmd_bounty: BOUNTY_SERVICE.list_bounties() - cmd_my: BOUNTY_SERVICE.list_bounties() or TRACKING_SERVICE.get_tracked_bounties() - cmd_add: BOUNTY_SERVICE.add_bounty() - cmd_update: BOUNTY_SERVICE.update_bounty() - cmd_delete: BOUNTY_SERVICE.delete_bounty() - cmd_track: TRACKING_SERVICE.track_bounty() (groups only) - cmd_untrack: TRACKING_SERVICE.untrack_bounty() (groups only) Fixes #13
Merge pull request 'feat(adapter): implement JSON file storage adapter for issue #9' (#27) from fix/issue-9 into main
JIGAIDO
Named after Nanami Kento's Cursed Technique restriction. Suppresses power during normal hours, exerts it during overtime.
A bounty tracking platform. Currently ships with a Telegram bot for managing and tracking bounties in groups and DMs.
Apps
- Telegram Bot — Group and personal bounty tracking via Telegram commands, with due date reminders
Overview
- Group bounties: Each Telegram group has its own bounty list
- Personal bounties: Private DM bounty list for individuals
- Admin-only posting: Only group admins can add/update/delete bounties
- Universal tracking: Any member can track bounties to their personal list
- Due date reminders: Daily cron notifies users when bounties are due within 7 days
- Free-form dates: Natural language due dates (
"tomorrow","in 3 days","april 15") - Link deduplication: No duplicate links within the same group
Project Structure
jigaido/
├── apps/
│ └── telegram-bot/ ← first app (Python)
│ ├── bot.py
│ ├── commands.py
│ ├── cron.py
│ ├── db.py
│ └── requirements.txt
└── SPEC.md ← full design specification
License
MIT
Description
Bounty tracker powered by Telegram — Nanami-style cursed technique for tracking obligations and overtime.
Languages
Python
99.1%
Shell
0.9%