- node-telegram-bot-api
- Clone repo and
cd
into the folder:
git clone https://www.github.com/timebotdon/telegram-whattoeatah
cd telegram-whattoeatah
-
Install required modules:
npm install
-
Create a new bot and retrieve the API Token.
- More information here: https://core.telegram.org/bots
-
Define Telegram Bot API token in
config.json
. The bot API token must be acquired from the Botfather bot. -
Run script.
node app_nodb.js
Note that the MongoDB version will NOT be included in future revisions(r2+) as it is overkill for the scale of this project.. for now.
- Existing MongoDB installation.
- Clone repo and
cd
into the folder:
git clone https://www.github.com/timebotdon/telegram-whattoeatah
cd telegram-whattoeatah
-
Install required modules:
npm install
npm install mongodb
-
Set up MongoDb
- Create a new database - example used is
test
. - Create a new collection in database - example used is
foodlist
- Import all entries of
foodlist.json
into the database.
- Create a new bot and retrieve the API Token.
- More information here: https://core.telegram.org/bots
-
Define Telegram Bot API token in
config.json
. The bot API token must be acquired from the Botfather bot. -
Run script.
node app.js
- Text the bot
what to eat ah
oreat what ah
via telegram. The response will include a randomized food suggestion derived from the JSON list/mongoDB database. - Text the bot
I want to eat
orI want
to specify a filtered response. eg:I want to eat cheaper korean fastfood
I will result in a response falling within those 3 categories (price, cuisine, foodtype) more explained on next section.
Accepted inputs. Refer to ./lists/list_food.json
for specifications. All inputs are case insensitive.
- fast_food - Message text: "fast food"
- casual_dining - Message text: "restaurant"
- hawker - Message text: "hawker" or "kopitiam"
- Chinese
- Malay
- Indian
- Western
- Korean
- Japanese
- Taiwanese
- Thai
- Vietnamese
- Multi (peranakan, mixed cuisines)
- $ - message text: "cheapest"
- $$ - message text: "cheaper" or "cheap"
- $$$ - message text: "midrange" or "mid"
- $$$$ - message text: "highend"
- $$$$$ - message text: "expensive" or "ex"
Food responses are now food type specific. Refer to ./lists/list_response_type.json
.
This will be implemented to include price specific as well. Refer to ./lists/list_response_price.json
.
The end goal is to send a randomized response between both categories.
The bot will now repond to "Thank you" messages with a randomized message. Refer to ./lists/list_response_NoProb.json
.
Yep theres still many bugs to fix at this point...
Features in plan
- Vegetarian/Vegan
- Halal / non halal
- Location linking via Google Places API
- Restaurant/Venue recommendation via Google Places API