The Bot to help choose the food delivery place for a pleasant evening.
- Clone the repo
- Install deps:
npm i - Create
.envfile with crucial constants:
LOS_BOT_ENV=DEV
NTBA_FIX_319=1
LOS_BOT_FEEDBACK_TG_CHAT_ID=<telegram_chat_id>
LOS_BOT_TG_TOKEN=<telegram_bot_api_token>
LOS_BOT_OC_TOKEN=<open_cage_geocoder_api_token>
LOS_REDIS_HOST=<redis_host>
LOS_REDIS_PORT=<redis_port>
LOS_MONGO_HOST=<mongo_host>
LOS_MONGO_PORT=<mongo_port>
LOS_MONGO_DB=<mongo_db>
LOS_MONGO_USER=<mongo_user>
LOS_MONGO_PASS=<mongo_pass>
LOS_EXPRESS_HOST=losbot.in.ua
LOS_EXPRESS_PORT=3000
- run
npm run stack(in separate window) - run
npm run watchts(in separate window) - run
npm start(in separate window) - run
npm run parsePlaces(in separate window)
NTBA_FIX_319should be set in order to address promise cancellation issue.LOS_BOT_FEEDBACK_TG_CHAT_IDshould be set to LOSbot-user chat ID for Feedback Handler to deliver user feedbacks right away. This corresponds to userId in private conversation with a bot.- In order for
LOS_EXPRESS_HOSTto work, dev need to add this line to his/var/hostsfile:127.0.0.1 losbot.in.ua
The bot supports next hierarchy of menu (each corresponds to a state user in):
- City select Menu
- Section select Menu
- I Feel Lucky Menu
- Kitchen Categories Menu 4.1 Kitchen Menu
- Food Categories Menu 5.1 Food Menu
- Feedback Menu