The below instructions can be followed in order to set-up this bot at your end in a span of few minutes! Let's get started:
-
This installation guide assumes that you have already installed Python (Python3 would be preferred)
-
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.
-
Create a new collection in MongoDB Cloud Atlas. In the directory where this repo has been cloned, create a .env file with format like .env.sample in this repo and replace XXXX with the actual bot name, tokens and api hash and MongoDB URLs:
-
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. Navigate to the directory containing the "code.py" file and run the following command:
python code.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!
These are the install instructions for the website:
npm install -g @angular/cli
angular material:
ng add @angular/material
installing tailwind:
npm install -D tailwindcss
Now navigate to web/SmartSpend and type
npm start
you should now be able to run the SmartSpend telegram bot and use the /website command to get your specific link for the website
- For Style Checker (in local directory):
pip install pycodestyle
- Run
pycodestyle --first <filepath>
- Install pytest:
pip install pytest
- Run
pytest test/test_start_and_menu_command.py
-
Install syntax checker through your choice of python IDEs
-
Run through your choice of python IDEs
- Install prettier
npm install --save-dev --save-exact prettier
npm run prettier
- Run:
npm run audit
Problem: Bot not running properly, having issues with client ID.
Solution:
- Check if dependencies are set properly.
- Follow install steps to get bot token.
- Paste new token in .env file.
Problem: Website not opening when I'm clicking on the website link in the command
Solution:
- Since the website is not deployed right now, the website must also be run
- follow steps to run the website in the install instructions