Skip to content

SlashBot is an easy-to-use Telegram Bot that assists you in recording your daily expenses on a local system without any hassle

License

Notifications You must be signed in to change notification settings

token1029/slashbot

 
 

Repository files navigation

💸 SlashBot

MIT license GitHub GitHub contributors DOI Platform codecov Actions Status github workflow Discord Lines of code Version GitHub issues GitHub closed issues


Demo Video

https://www.youtube.com/watch?v=uIHnW8YmrsU

About SlashBot

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
  • Add/Delete members
  • Displays members
  • split bills across different
  • email splited bill to members involved
  • display splited bill
  • delete bills splited

Sample demos are shown below. They are run on a local machine.


⭐ Whats New

Release Version 1.3.1

  • Split a bill acrross different members using the /splitBill command
  • Email the bill splited to members involved using the /emailBill command
  • Display the bill history using the /viewSplitBill
  • Delete the bill by choosing the name of the bill by using /deleteBill
  • Details for testing requirements added in README.md
  • Add more test cases

Release Version 1.3.0

  • Add members using /addMember
  • Delete the member by choosing the name of the memebr by using /memberDelete
  • Display the members list by using the /memberList
  • Add more documentaions for the functions

🚀 Installation Guide

💻For developers

  1. Install Python, atleast Python3

  2. Clone this repository to your local system at a suitable directory/location of your choice

  3. Start a terminal session, and navigate to the directory where the repo has been cloned

  4. Run the following command to install the required dependencies:

  pip install -r requirements.txt
  1. Download and install the Telegram desktop application for your system from the following site: https://desktop.telegram.org/

  2. Once you login to your Telegram account, search for "BotFather" in Telegram. Click on "Start" --> enter the following command:

  /newbot
  1. 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)

  2. BotFather will now confirm the creation of your bot and provide a TOKEN to access the HTTP API - copy this token for future use.

  3. 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.

  4. 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
  1. A successful run will generate a message on your terminal that says "TeleBot: Started polling."
  2. 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

💻For testing with Pytest

  1. Some modules in testing require CHAT_ID environment variable to be set.
  2. This is the specific ID that is maintained for your chat with the Bot.
  3. While running the bot.py , get this id from line 72 and set it in your system environment variables.
  4. This should ensure effective running of all tests.

💁 Sample Demos

Add member

  1. Enter the /addMember command
  2. Enter the new new member name
  3. Enter the member email address

Delete member

  1. Enter the /memberDelete command
  2. Chose the name of the member

View memberList

  1. Enter the /memberList command

Split a bill

  1. Enter the /splitBill command
  2. Enter name of the bill
  3. Enter amount of the bill
  4. Chose Creditor
  5. Chose Debtors

View the splited bill

  1. Enter the /viewSplitBill command

Email the splited bill

  1. Enter the /emailBill command

Delete a splited bill

  1. Enter the /deleteBill command
  2. Chose the name of the bill to delete

Clear Bill history

I want to send myself an email for the monthly expenditure

  1. Enter the /clearBill› command

📄 License

This project is licensed under the terms of the MIT license. Please check License for more details.

Score Card


https://github.com/token1029/slashbot/blob/main/proj2/proj2rubric.md

✨ Contributors


Weizhi Gao


Fucheng Guo


Zikang Wang


Dongming Wu

📲 Support

For any support, email us at [email protected]

About

SlashBot is an easy-to-use Telegram Bot that assists you in recording your daily expenses on a local system without any hassle

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%