mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 20:44:02 +00:00
1.8 KiB
1.8 KiB
HOUSEBOT-080 Payment Confirmations From Household Topic
Goal
Track when members confirm rent or utility payments from a dedicated household topic, without forcing them to type an exact amount every time.
Scope
- add a
paymentshousehold topic role and/bind_payments_topic - ingest text or caption-based confirmations from the configured payments topic
- persist every confirmation message idempotently
- record deterministic payment entries when the bot can resolve the amount safely
- keep ambiguous confirmations in
needs_reviewinstead of guessing - expose paid and remaining amounts in the finance dashboard
Parsing rules
- detect
rentintent from phrases likeза жилье,аренда,paid rent - detect
utilitiesintent from phrases likeкоммуналка,газ,электричество,utilities - treat generic confirmations like
готовоas review-required - treat multi-person confirmations like
за двоихorза Кирилла и себяas review-required - parse explicit amounts when present
- if no amount is present:
rentresolves to the member's current rent shareutilitiesresolves toutilityShare + purchaseOffset
Persistence
payment_confirmations- stores raw Telegram message context and normalized review state
payment_records- stores accepted cycle-scoped payments in settlement currency
Acceptance
- a member can say
за жилье закинулorоплатил коммуналкуin the configured payments topic - the bot records the payment against the current cycle when resolution is deterministic
- the dashboard shows
due,paid, andremaining - ambiguous confirmations are stored for review, not silently converted into money movements