Skip to content

A bot that helps you manage and track your daily expenses.

Notifications You must be signed in to change notification settings

kennethcyh/telegram-expense-bot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

telegram-expense-bot

This is a bot for the Telegram messaging app using their bot platform. The code is open-source and consequently anybody could set up an own instance of the bot. To learn how to do so, see this section. The official hosted version is available as @ExpenseBot. To learn more about this bot, please refer to this blog article or just send the bot a message with the /help command.

What does it do?

This bot’s purpose is to help people manage their daily expenses and keep track of their financial situation. Users can add expenses from wherever they are using a few simple commands from within the chat and have an eye on how much they have spent in a month or a day. This obviates the need for confusing Excel spreadsheets or paper notes.

How to host it myself?

Prerequisites

In order to host this bot on your own, you need a few things.

  • Server to run the bot on (since the bot uses the long polling method to get updates instead of the web-hook one, you don't need HTTPS certificates or ports to be exposed)
  • Node.js (preferbly at the latest version)
  • A MongoDB database (you can use mlab.com to get a free, hosted MongoDB)
  • A bot token, which you get from registering a new bot to the @BotFather

Configuration

To configure your bot, clone this repository and then edit config.json file.

  • DB_URL: your MongoDB's complete URL including hostname, port, username, password and database name (if using mlab, you can simply copy this from their website)
  • DB_COLLECTION: the name of the database collection where your data should be stored, e.g. "expenses_live"
  • BOT_TOKEN: the token you got from the BotFather
  • BOT_NAME: the bot's name, e.g. "ExpenseBot" in my case
  • BOT_TELEGRAM_USERNAME: the bot's actual unique Telegram username, e.g. "@ExpenseBot" in my case (note that this can differ from the BOT_NAME, which is not unique)

Run

$ npm start

License

MIT @ Ferdinand Mütsch

About

A bot that helps you manage and track your daily expenses.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%