Expenses bot is a telegram bot which assists you in managing daily expenses
Bot is able to:
- Log expenses and present them in a simple way
- Cancel latest expenses
- Reset all expenses
- Be easily scaled and fitted to your own needs by just modifying one JSON file
Download and install the latest version of Node.js
Clone this repo and install dependencies:
git clone https://github.com/belotserkovtsev/expenses-bot.git
cd expenses-bot
npm install
Insert your bot token as environment variable and modify expenses.json so that it fits your needs in tracking expenses
{
"entertainment": {
"limit": 1000,
"expenses": 0,
"displayName": "📱Entertainment",
"abbreviations": [
"ent",
"entertainment"
]
},
"extra": {
"limit": 1000,
"expenses": 0,
"displayName": "🥶Extra",
"abbreviations": [
"ext",
"extra"
]
}
}
The other option is to insert bot token right into app.js:
const bot = new Telegraf('token');
Launch your application with pm2, node
node app.js
Description | Command | Param 1 | Param 2 |
---|---|---|---|
Adds expense to json | /add | abbreviation: String | amount: Int |
Cancels last expense | /cancel | ||
Displays expenses | /show | ||
Shows available abbreviations mapped with displayName | /items | ||
Resets expenses for every item in json | /reset |
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.