Inspiration

Our main inspiration was the theme of diversity. We wanted to embody the ideal of many groups of people coming together to form one united cause. The most powerful message is a visual message, so we decided to write a Discord bot that would really capture that feeling. From there, we found that finding combinations of images and keywords was a fun concept to build upon.

What it does

ImageBot is a Discord bot that takes both an image and a keyword in order to create a collage out of images found by searching that keyword resembling the original image given to the bot

ImageBot also has a specific command to create any image out of Minecraft block textures

But it doesn't stop there, ImageBot can also tell you the current weather as well as the predictions for up to the next four days.

How we built it

The Discord interface was written in GO with a library called discordgo to create the message handlers and send messages through the Discord service.

The collage creration process was done in python with opencv and numpy.

The weather information process was also written in python and uses BeautifulSoup to collect data from HTML.

The images are found using the Bing image search api to collect links and an asyncronous GO script to download a lot of images as quickly as possible.

The whole process is hosted on an instance of Compute on the Google Cloud Platform.

Challenges we ran into

We ran into many problems that we had to overcome. One being how to efficiently download large numbers of images in a short amount of time in order to ensure the bot felt responsive but still found quality images to use . Another issue we faced was the process of learning how to use a database when most of us had never used one before. Despite these issues we managed to make a bot that we all could be proud of.

Accomplishments that we're proud of

We didn't really expect that we would be able to finish a project since for most of us, this was our first hackathon. But by the end of the weekend, we had a discord bot fully deployed, running on the Google Cloud Platform. We also did not expect our "collage creation" function to have the efficiency it did. We were about to give up on Saturday night when we had a breakthrough that increased efficiency by a significant margin.

What we learned

We learned a lot about all of the technologies we worked with. For example we learned how to write a non-blocking async bot where multiple conversations with the bot could be taking place at the same time. Also we learned how to create and maintain a NoSQL database as well as how to increase python's array efficiency with numpy. Beyond that we learned about webscraping for information in order to keep our bot well informed. Finally we worked with cloud deployment in order go get our bot running safely in the cloud.

What's next for ImageBot

Originally, our goals with ImageBot were to simply have fun at our first hackathon while still building a unique project we could be proud of. We never strayed from those aspirations. While ImageBot's functionality may never save a life or help in day-to-day utility, we built ImageBot to have fun, and we hope the end product represents that.

Share this project:
×

Updates