https://www.youtube.com/watch?v=uIHnW8YmrsU
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.
- 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
- 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
-
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.
- Enter the
/addMember
command - Enter the new new member name
- Enter the member email address
- Enter the
/memberDelete
command - Chose the name of the member
- Enter the
/memberList
command
- Enter the
/splitBill
command - Enter name of the bill
- Enter amount of the bill
- Chose Creditor
- Chose Debtors
- Enter the
/viewSplitBill
command
- Enter the
/emailBill
command
- Enter the
/deleteBill
command - Chose the name of the bill to delete
I want to send myself an email for the monthly expenditure
- Enter the
/clearBill›
command
This project is licensed under the terms of the MIT license. Please check License for more details.
https://github.com/token1029/slashbot/blob/main/proj2/proj2rubric.md
Weizhi Gao |
Fucheng Guo |
Zikang Wang |
Dongming Wu |
For any support, email us at [email protected]