This bot provides you weather info about any city in the world !
You have a few commands to do:
- /start
- /find_city
- /cancel
- /set_default_city
- /default
Search by find_city command.
Just write a city name like this:
Madrid
The bot is going to answer:
1. Barajas de Madrid,ES
2. Comunidad de Madrid,ES
3. General La Madrid,AR
4. Humanes de Madrid,ES
5. Lamadrid,ES
6. Las Rozas de Madrid,ES
7. Madrid,CO
8. Madrid,ES
9. Madrid,MX
10. Madrid,PH
11. Madrid,US,IA
12. Madridanos,ES
13. Madridejos,ES
14. Madridejos,PH
15. New Madrid,US,MO
16. Partido de General La Madrid,AR
17. Provincia de Madrid,ES
18. Rivas-Vaciamadrid,ES
19. Valmadrid,ES
Then choose a number and get weather info.
You can see them in Cargo.toml file.
- RUST_TELEGRAM_BOT_TOKEN=TOKEN OF THE BOT
- OPEN_WEATHER_MAP_API_TOKEN=TOKEN OF THE API
- RUST_LOG=info
- DATABASE_URL=postgres://postgres:postgres@localhost/weather_bot
- Install docker.
Start PostgreSQL container.
$ make db
Runs the migrations
$ make diesel
Run the bot
$ make run
Stop Docker PostgresSQL DB
$ make stop
- Install docker
- Install docker compose (tested with docker-compose v2).
- SET_DB see in start.sh file what it does.
- REVERT_DB see in start.sh file what it does.
- OPEN_WEATHER_MAP_TOKEN=TOKEN
- RUST_TELEGRAM_BOT_TOKEN=TOKEN
- RUST_LOG=info
- DATABASE_URL=postgres://postgres:postgres@db/weather_bot
$ make compose
This will run both containers, PostgreSQL container and Bot container