Dora is a one-stop bot to quickly retrieve taxi fare estimations and make comparisons all on one convenient single platform. You no longer have to open multiple applications on your mobile phone before coming to a decision! Taxi companies currently in the list of comparisons include Uber, Grab and ComfortDelGro. Chat with Dora now on Telegram @dooorabot!
telegramBot.py
- Main Bot fileconfig.py
- Stores the IDs, keys and tokens for APIscomfort.py
- Returns the fare estimate of ComfortDelGro via an APIgrab.py
- Returns the fare estimate of Grab via an arithmetic algorithm according to Grab's fare structureuber.py
- Returns the fare estimate of Uber via an APIdistance.py
- Returns the road distance estimate between two selected locations via Google's Distance Matrix APIrequirements.txt
- Lists the required python libraries for this project
- Google Places Distance Matrix
- Google Places Autocomplete
- Google Places
- TaxiFareFinder Fare Estimate
- Uber Fare Estimate
- /taxi - Compare prices across taxi companies by inputting your pick up and drop off location
- /cancel - Cancel the current action
- /help - Show a list of available commands
- Navigate into the directory via the terminal using
cd PATH/TO/FOLDER
- Install the required modules by running
pip3 install -r requirements.txt
(Note that this bot runs on Python 3) - Create a
config.py
usingsampleconfig.py
as a template. This will be where all the API keys will be stored and used. Be sure to have created your own bot via The Botfather and input your own bot API key. - Run
python3 telegramBot.py
on your terminal to start the server - Start conversing with your own bot on Telegram
Below are example inputs to achieve the corresponding test cases, where you'll see how Dora responds accordingly.
- Pick Up location: 'ntu tanjong hall'
- Drop Off location: 'causeway point'
- Result: Fare estimates retrieved and comparisons displayed
- Typo cases: 'ntu tanjong hal', 'pungol centrl'
- Result: Bot will prompt user to re-input location
- Pick Up location: '192 Punggol Central'
- Drop Off location: '192 Punggol Central'
- Result: Bot will alert user of an invalid pick up and drop off location set, and suggest user to try the entire flow again.
- Pick Up location: 'Pulau Tekong'
- Drop Off location: 'Pulau Ubin'
- Result: Bot will alert user of an invalid pick up and drop off location set, and suggest user to try the entire flow again.
- User: '/taxi'
- Dora: 'Gotcha! Where would you like to be picked up from?'
- User: 'NTU Tanjong Hall of Residence'
- Dora: 'Sweet! I found these locations! Which would you like your pick up point to be?' (Select location from up to 5 options)
- Dora: 'Now where would you like to be dropped off at?'
- User: 'Jurong Point'
- Dora: 'Gotcha! I found these locations! Which would you like your drop off point to be?' (Select location from up to 5 options)
- Dora: 'Gotcha! Retrieving prices...'
- Dora: 'Here are the estimated prices to travel from NTU Tanjong Hall of Residence to Jurong Point from the various taxi companies!'
- Dora: 'Feel free to type '/taxi' again to retrieve more fare comparisons! :)'