Skip to content

A slack weather bot that reports the weather of a given city.

Notifications You must be signed in to change notification settings

stacysn/slack-weather-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@WeatherBot ☀️ ⚡ ☁️

A slack weather bot that reports the weather of a city of choice using the OpenWeatherMap API.

Getting Started

This bot is hosted on Heroku, which may take a while for the response ⌛ . Instructions for running this bot locally could be found below.

  1. If bot is active, type in the bot followed by the city name: @Weather Bot (CITY-NAME)

    example: @Weather Bot San Francisco

  2. The bot will report with the appropriate message.

To run bot locally

  1. Clone this repository.
  2. Create your own openweatherAPI_Key by creating a free account at openweatherma.
  3. Create your Slack API Key.
  4. Add in your new keys to your .bash_profile in your terminal.
        export SLACK_TOKEN='xoxb************';
        export OpenWeather_API_Key='644***********';
    
    
  5. Install dependencies: npm install
  6. Start running bot: npm start
  7. Type in @Weather Bot (CITY-NAME) into a Slack channel with the city of choice.

Built With:

Design/Architecture & Improvements

  • @Weather Bot covers basic weather report to the user
    • High and Low temperature of the day and description of the weather
  • Bot looks for key words in description of weather, such as cloudy, to determine emojis and messages to send back to user
    • Can be improved by making messages more descriptive after more familiarity/research of weather conditions (ex. humidity, pressure, wind, etc) at different places.
  • Deployed using Heroku
  • Initially, I tried out Dialogflow to check out if natural language could be used to train the bot. This process covered more than what the basic weather bot intended.
  • Configuration of secret tokens was something that needed to be thought out more.
    • Can look for ways to improve so users wouldn't have to create new tokens
    • Useful link from Heroku
    • Storing API keys

License

This project is licensed under the MIT License.

Acknowledgements and Resources

About

A slack weather bot that reports the weather of a given city.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published