1
0
mirror of https://github.com/franjsco/umbrello-bot synced 2025-02-20 05:30:57 +01:00
Francesco Esposito b4c4d2c0c2 Edit readme
2019-08-26 17:47:47 +02:00
2019-08-26 17:19:52 +02:00
2019-08-22 17:31:40 +02:00
2019-08-22 17:21:27 +02:00
2019-08-26 15:21:35 +02:00
2019-08-16 15:33:07 +02:00
2019-08-26 17:47:29 +02:00
2019-08-22 17:21:27 +02:00
2019-08-16 15:33:07 +02:00
2019-08-26 15:40:00 +02:00
2019-08-16 15:22:12 +02:00
2019-08-22 17:21:27 +02:00
2019-08-22 17:21:27 +02:00
2019-08-26 17:47:47 +02:00

umbrello-bot

An opensource telegram bot to know if you need to take the umbrella.

Technologies:

  • Node.js
  • Telegraf.js

Usage

umbrello-bot uses the umbrello-api to get weather information.

1. Search the city.

Search the city id with:

/search [city name] 

example: /search Roma

It will send back the cities id.

2. Set the city.

Set the city wth:

/set [city id]

example: /set 3169070. (3169070= Rome, IT)

3. Get the forecasts.

Get the forecasts with:

/get

Installation

Step by step.

  1. Install Node.js and npm.
  2. Configure umbrello-api.
  3. Clone this repository.
  4. Install dependencies with npm install.
  5. Create a new bot with BotFather on Telegram
  6. Create env file or set environment variables (read: "Environment variables")
  7. Build the code with npm run build.
  8. Launch the bot with npm run serve.

Environment Variables.

NODE_ENV=production
TELEGRAM_TOKEN=token-here
UMBRELLO_API_URL=url-here

DB_HOST=mongodb://host:port/db
DB_USER=user
DB_PASSWORD=pass

Build Docker image

# cd umbrello-bot/
# docker build -t umbrello-bot:1.0 .
# docker run umbrello-bot:1.0

License

GPLv3


Made with ❤️ by Francesco Esposito (@frsposito)

Languages
JavaScript 97.7%
Dockerfile 2.3%