Skip to content

🤖 telegram bot which assists you in managing daily expenses

Notifications You must be signed in to change notification settings

belotserkovtsev/expenses-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Expenses-bot

Expenses bot is a telegram bot which assists you in managing daily expenses

📟 Features

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

💻 Installation

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

📟 Availible commands

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

📱 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.