refactor(commands): use core services instead of storage module #33
Reference in New Issue
Block a user
Delete Branch "fix/issue-13"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Refactor commands.py to be thin Telegram wrappers around core services.
Changes
import storagewith imports fromcore.servicesandadapters.storageformat_bounty()to work with Bounty dataclass instead of dictget_room_id()helper for unified group/DM handlingCommands Updated
/bountyBountyService.list_bounties()/myBountyService.list_bounties()orTrackingService.get_tracked_bounties()/addBountyService.add_bounty()/updateBountyService.update_bounty()/deleteBountyService.delete_bounty()/trackTrackingService.track_bounty()(groups only)/untrackTrackingService.untrack_bounty()(groups only)Kept from Original
parse_args()format_bounty()extract_args()Acceptance Criteria
Fixes #13
is it possible for commands.py to have unit tests? so we can be sure that all these commands are exists and calling the right function (by mocking), handling the right params, and returning the right output
lgtm