Inspiration

We took 2 of the prompts that interested us (discord bot + suggest outfit based on weather) and put them together.

What it does

The bot takes real-time weather data and then generates a semi-random outfit suitable for the weather.

Coordinates can be specified to get suitable clothing decisions for anywhere in the world.

It is also possible to save outfits and recall them later.

How we built it

We used Python and the discord.py library.

Weather information is from OpenWeatherMap's weather API.

Images are from Wikipedia and retrieved using their API. If the Wikipedia doesn't return any images, the bot takes an image from Unsplash instead.

Challenges we ran into

We had little experience with the python.py library, so it was somewhat of a challenge to learn it within the limited time period.

Images retrieved from Unsplash were often unrelated ("turtle neck" -> human neck, neck of river, etc.).

Ideally, we would have preferred to get access to an API from a shopping site (ex. Amazon) that would return actual products the user may be able to purchase, but we were unable to find one.

Accomplishments that we're proud of

The bot works.

We haven't found any bugs remaining in the program yet, and works as intended.

What we learned

  • Python's async and await keywords
  • Wikipedia, OpenWeatherMap, Unsplash APIs
  • Downloading images through Python
  • discord.py library

What's next for Weather Outfit Discord Bot

With more time (and money), the bot could become able to recommend actual products to buy. Additional features could be added such as using weather forecasts to generate clothing forecasts(?).

The bot was not designed to handle multiple users, and could be optimized.

Built With

Share this project:

Updates