A Telegram Bot built using Ruby. Get statistics and updates about Covid-19 for any country and the latest weather forecast for cities worldwide.
If you want to run the project locally in your machine, then you need to obtain the API keys to run it, otherwise it will throw an error.
- You can get the Telegram Bot Token from BotFather.
- Go to OpenWeather Website
- Sign up and go to this page
- Copy the API key
- Clone the Repo
git clone https://github.com/mohammadumar28/chat-bot.git
- Run
cd chat-bot
to change directory to the cloned repo. - In the cloned repo directory, create a
.env
file - Create 2 variables like this:
TELEGRAM_TOKEN=<Replace with Telegram Bot Token>
OPENWEATHER_API=<Replace with OpenWeather API key>
- Run
bundle install
. - Run
ruby bin/main.rb
to start the bot. - Open the bot in a Telegram app using this link
The bot has been already deployed and running on Heroku, So running the project locally might throw an error because only 1 instance of the bot can run at a time.
/start
- Welcome Message.covid/<country-name>
- Current Covid-19 stats for a country.weather/<city-name>
- Latest Weather forecast for a city./date
- today's date./help
- List of all the commands and examples.
- Ruby
- RSpec
- Heroku
Muhammad Umar
- Github: @mohammadumar28
- LinkedIn: Mohammad Umar
- Twitter: @Mohammadumar28
- Telegram: @mohammadumar28
- Email: [email protected]
- Fork this repo.
- Create your feature branch
git checkout -b my-new-feature
. - Commit your changes
git commit -am "Add some feature"
. - Push to the branch
git push origin my-new-feature
. - Create a new Pull Request.