Skip to content
This repository was archived by the owner on Jan 20, 2023. It is now read-only.

Repository files navigation

lets-order-something-bot

The Bot to help choose the food delivery place for a pleasant evening.

How to start Development

  1. Clone the repo
  2. Install deps: npm i
  3. Create .env file 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
  1. run npm run stack (in separate window)
  2. run npm run watchts (in separate window)
  3. run npm start (in separate window)
  4. run npm run parsePlaces (in separate window)

Environment Variables

  • NTBA_FIX_319 should be set in order to address promise cancellation issue.
  • LOS_BOT_FEEDBACK_TG_CHAT_ID should 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_HOST to work, dev need to add this line to his /var/hosts file: 127.0.0.1 losbot.in.ua

Bot menu list

The bot supports next hierarchy of menu (each corresponds to a state user in):

  1. City select Menu
  2. Section select Menu
  3. I Feel Lucky Menu
  4. Kitchen Categories Menu 4.1 Kitchen Menu
  5. Food Categories Menu 5.1 Food Menu
  6. Feedback Menu

About

The Bot to help order some food for a pleasant evening. Worked in Odesa, Ukraine.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages