项目作者: fpfuetsch

项目描述 :
Interactive Telegram Fuel Price Bot
高级语言: TypeScript
项目地址: git://github.com/fpfuetsch/Spritpreise.git
创建时间: 2019-07-21T13:59:22Z
项目社区:https://github.com/fpfuetsch/Spritpreise

开源协议:GNU General Public License v3.0

下载


Telegram Spritpreis Bot

Telegram bot that notifies about relevant price changes of subscribed gas stations using the Tankerkönig API.

Currently only the German language is supported.

Environment Variables

  • API_KEY - API Token for Tankerkoenig
  • DB_URL - Mongo database URL
  • SERVER_PORT - Server port
  • WEBHOOK_HOST - URL of webhook host (e.g. https://example.org)
  • TELEGRAM_TOKEN - Telegram bot token
  • UPDATE_CYCLE - Minutes until prices are updated
  • SEARCH_RADIUS - Search radius in km for gas stations

Deployment

Telegram

If the WEBHOOK_HOST is set, the bot runs in webhook mode. Otherwise polling mode is activated.

Development

$ npm run dev

Docker-Compose

  1. Copy mongo-init.js_template to mongo-inits.js and set MongoDB password in it
  2. Copy env_template and env-db_template accordingly and set the correct variables in them
  3. Run docker-compose up