Telegram bot for recording restaurant bills and split them with participants efficiently
-
reg- registers new participant. -
list- lists of participants -
share <Amount> [in <Restaurant>] with <@username1> <@username2>...- means that message sender paid <Amount> in <Restaurant> and want to split the bill equally between pointed participants and himself/herself. E.g.:@Asent:share 12 with @B @C
So,@Apaid 12 for@A,@Band@C
Since that@Band@Cowe to@A4 -
calc- summarizes all debts and get optipmal way to get debts back. E.g.:A:
/share 12 with @B @C
B:/share 12 with @A @C
C:/calc
Bot:list of debts:
@C -> @A - 4.00
@C -> @B - 4.00 -
history- shows personal history of debts -
amnesty- wipe off all debts, be careful!
- git clone git@github.com:cloudedcat/debt-bot.git
- get Token from @BotFather
- set up empty fields in
config.go go build && ./debt_bot
- customize
UserandExecStartindebt_bot.service - exec
sudo cp debt_bot.service /etc/systemd/system/
sudo systemctl enable debt_bot
sudo systemctl start debt_bot
