A telegram bot calculating communal expenses for hot, cold water, for water disposing, and for electricity in Moscow.
- JDK17 - OpenJDK HotSpot, for example.
- Postgres database - See
src/main/sql/create-tables.sql
script to create mandatory tables. Put connection URL indburl
system property. - Token taken from BotFather bot.
Put the token into
token
system property.
- User selects "new calculation"
- bot: enter cold water last meter readings
- user: enters
- bot: enter hot water current meter readings
- user: enters
- bit: repeats the same questions for hot water and electricity
- bot: parses the pages from links below, finds prices, for current date and calculates payment amounts.
- bot: send a message to user in following format:
Cold water:
- the price sets from 01.07.2020
- amount to pay: 3456 RUB (123L × 123 RUB/L)
Hot water:
- the price sets from 01.08.2020
- amount to pay: 3456 RUB (123L × 123 RUB/L)
Water disposal:
- the price sets from 01.09.2020
- amount to pay: 3456 RUB (345L × 123 RUB/L)
Electricity:
- the price sets from 01.10.2020
- amount to pay: 3456 RUB (123KW × 123 RUB/KW)
It hosts on https://heroku.com and available here https://t.me/moskommunalbot