Compare commits

...

4 Commits

Author SHA1 Message Date
Francesco Esposito 058cc2d743
Merge pull request #7 from franjsco/dependabot/npm_and_yarn/axios-0.21.1
Bump axios from 0.19.2 to 0.21.1
2021-02-13 17:45:10 +01:00
dependabot[bot] fd840eff3e
Bump axios from 0.19.2 to 0.21.1
Bumps [axios](https://github.com/axios/axios) from 0.19.2 to 0.21.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.19.2...v0.21.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-05 21:33:52 +00:00
franjsco 40d04336ca update readme 2020-05-19 15:34:03 +02:00
franjsco eed9594e59 update readme & dependencies 2020-05-19 15:28:41 +02:00
5 changed files with 1268 additions and 1490 deletions

View File

@ -1,23 +1,44 @@
# umbrello-bot
An opensource telegram bot to know if you need to take the umbrella.
<h1 align="center">Welcome to umbrello-bot ☂️</h1>
<p>
<a href="https://github.com/franjsco/umbrello-bot/blob/master/LICENSE" target="_blank">
<img alt="License: GPL--3.0--or--later" src="https://img.shields.io/github/license/franjsco/umbrello-bot" />
</a>
<a href="https://twitter.com/franjsco" target="_blank">
<img alt="Twitter: franjsco" src="https://img.shields.io/twitter/follow/franjsco.svg?style=social" />
</a>
</p>
<img src="assets/screenshot.png" height="400">
> A telegram bot to know if you need to take the umbrella.
<img src="screenshot.jpg">
**Technologies**:
## Install
- Node.js
- Telegraf.js
1. Install Node.js and npm.
2. Install MongoDB.
3. Configure [umbrello-api](https://github.com/franjsco/umbrello-api).
4. Clone this repository.
5. Install dependencies with `npm install`.
6. Create a new bot with **@BotFather** on Telegram
7. Create env file or set environment variables (read: "Environment variables")
8. Build the code with `npm run build`.
9. Launch the bot with `npm run serve`.
#### Environment Variables.
```sh
NODE_ENV=production
TELEGRAM_TOKEN=token-here
UMBRELLO_API_URL=url-here
DB_HOST=mongodb://host:port/db
DB_USER=user
DB_PASSWORD=pass
```
## Usage
**umbrello-bot** uses the [umbrello-api](https://github.com/franjsco/umbrello-api) to get weather information.
### 1. Search the city.
#### 1. Search the city.
Search the city id with:
```
@ -29,7 +50,7 @@ Search the city id with:
It will send back the cities id.
### 2. Set the city.
#### 2. Set the city.
Set the city wth:
```
@ -39,39 +60,12 @@ Set the city wth:
*example: `/set 3169070`. (3169070= Rome, IT)*
### 3. Get the forecasts.
#### 3. Get the forecasts.
Get the forecasts with:
```
/get
```
## Installation
### Step by step.
1. Install Node.js and npm.
2. Configure [umbrello-api](https://github.com/franjsco/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/
@ -79,8 +73,22 @@ DB_PASSWORD=pass
# docker run umbrello-bot
```
## License
GPLv3
## Author
---
Made with ❤️ by Francesco Esposito ([@franjsco](https://github.com/franjsco))
👤 **franjsco (Francesco Esposito)**
* Website: https://franjsco.github.io/
* Twitter: [@franjsco](https://twitter.com/franjsco)
* Github: [@franjsco](https://github.com/franjsco)
## Show your support
Give a ⭐️ if this project helped you!
## 📝 License
Copyright © 2020 [franjsco (Francesco Esposito)](https://github.com/franjsco).<br />
This project is [GPL--3.0--or--later](https://github.com/franjsco/umbrello-bot/blob/master/LICENSE) licensed.
***
_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_

Binary file not shown.

Before

Width:  |  Height:  |  Size: 588 KiB

2646
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -20,17 +20,17 @@
},
"homepage": "https://github.com/franjsco/umbrello-bot#readme",
"devDependencies": {
"@babel/cli": "^7.5.5",
"@babel/core": "^7.5.5",
"@babel/node": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"eslint": "^6.2.1",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-plugin-import": "^2.18.2",
"nodemon": "^1.19.1"
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.6",
"@babel/node": "^7.8.7",
"@babel/preset-env": "^7.9.6",
"eslint": "^6.8.0",
"eslint-config-airbnb-base": "^14.1.0",
"eslint-plugin-import": "^2.20.2",
"nodemon": "^1.19.4"
},
"dependencies": {
"axios": "^0.19.0",
"axios": "^0.21.1",
"dotenv": "^8.0.0",
"mongoose": "^5.6.9",
"telegraf": "^3.32.0",

BIN
screenshot.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB