SlashBot is an easy-to-use Telegram Bot that assists you in recording your daily expenses on a local system without any hassle.
With simple commands, this bot allows you to:
- Add/Record a new spending
- Show the sum of your expenditure for the current day/month
- Display your spending history
- Clear/Erase all your records
- Edit/Change any spending details if you wish to
- Download your expenditure history in the CSV format
- Visualize your spendings in the form of graphs/pie chart using the /chart option
- Email the history CSV file to yourself
- See the total daily/monthly expenditure in different currencies
Check out the bot here: https://t.me/ncsuBot
Sample demos are shown below. They are run on a local machine.
- See your total daily/monthly expenditure in differet currencies using the /displayDifferentCurrency command
- Download your spendings history CSV file using the /download command
- Email the monthly spendings history to yourself using the /sendEmail command
- User can now get a message when the monthly budget is exhausted.
- Details for testing requirements added in README.md
- Visualize your spendings in the form of graphs
- The User can now see his expenses across various categories in the form of graphs along with pie charts.
- Just go on adding multiple spendings using /add and type /chart to see the spendings in the form of graphs.
- More Badges added in Repository
-
Install Python, atleast Python3
-
Clone this repository to your local system at a suitable directory/location of your choice
-
Start a terminal session, and navigate to the directory where the repo has been cloned
-
Run the following command to install the required dependencies:
pip install -r requirements.txt
-
Download and install the Telegram desktop application for your system from the following site: https://desktop.telegram.org/
-
Once you login to your Telegram account, search for "BotFather" in Telegram. Click on "Start" --> enter the following command:
/newbot
-
Follow the instructions on screen and choose a name for your bot. Post this, select a username for your bot that ends with "bot" (as per the instructions on your Telegram screen)
-
BotFather will now confirm the creation of your bot and provide a TOKEN to access the HTTP API - copy this token for future use.
-
Search for "Edit the system environment variables" on your local computer. Click on Environment Variables and create a new System Variable called "API_TOKEN" and paste the token copied in step 8.
-
In the Telegram app, search for your newly created bot by entering the username and open the same. Once this is done, go back to the terminal session. Make sure you export the PYTHONPATH variable to the main project folder
python src/bot.py
- A successful run will generate a message on your terminal that says "TeleBot: Started polling."
- Post this, navigate to your bot on Telegram, enter the "/start" or "/menu" command, and you are all set to track your expenses!
For more info on deployment(Heroku), check out the doc here
- Some modules in testing require CHAT_ID environment variable to be set.
- This is the specific ID that is maintained for your chat with the Bot.
- While running the bot.py , get this id from line 72 and set it in your system environment variables.
- This should ensure effective running of all tests.
I want to increase/decrease my monthly budget.
- Enter the
/budget
command - Enter the new budget amount (must be greater than 0)
I just spent money and want to mark it as a transaction!
- Enter the
/add
command - Click on the date of the transaction
- Click on the category to add
- Type in the amount spent
Oh no! I entered a transaction but want to delete it!
- Enter the
/delete
command - Based on how many records you want to delete..
- Per day: enter the day to delete
- Per month: enter the month to delete
- All: enter All
- The records will be display. Enter YES to confirm, or NO to cancel
Oh no! I entered a transaction but entered the wrong category!
- Enter the
/edit
command - Specify the date, category, and value of the transaction
- Specify what part of the transaction to edit (either date, category, or value)
- Enter in a new value
I want to add transactions from a CSV my bank gave me, and visalize my spendings
- Drag the .csv file into the telegram chat, and press send
- For each transaction, classify the category
- The application will remember these mappings
- Enter the
/chart
command
I want a CSV file of all my transactions.
- Make sure you have a transaction history.
- Enter the
/download
command. - A CSV file will be sent with your history.
I want to convert my total daily or monthly expenditure in a different currency.
- Enter the /displayDifferentCurrency command
- Choose from the category of day or month
- Next, Choose your currency from the options
- You will get the converted price in that currency
I want to see my spendings in the form of graphs
- Make sure you have a transaction history.
- Enter the
/chart
command. - You will see multiple visualizations for your spending
I want to send myself an email for the monthly expenditure
- Make sure you have a transaction history.
- Enter the
/sendEmail
command. - Type the intended email address
- You will get an email with the history file as attachment
Thorough documentation of all methods and classes can be found at Github Pages
Our ideas for new features that can be implemented to make this project better can be seen in our RoadMap project board. Road Map
We would like to thank Dr. Timothy Menzies for helping us understand the process of building a good Software Engineering project. We would also like to thank the teaching assistants Xiao Ling, Andre Lustosa, Kewen Peng, Weichen Shi for their support throughout the project.
This project is licensed under the terms of the MIT license. Please check License for more details.
Shubham Mankar |
Pratik Devnani |
Moksh Jain |
Rahil Sarvaiya |
Anushi Keswani |
For any support, email us at [email protected]/ [email protected]