Combining the Ocean theme and our frequent use of Discord, we decided to create a Discord bot that involved some form of learning. At the same time, we hoped to make the bot enjoyable, which led to our game-like spawn and collect features.

What it does

Koi Bot is a Discord bot built in python that supports 4 commands: =spawn: This spawns a random animal, which the user can collect by replying with the corresponding emote. If the user responds with the correct emote, the animal will be added to the user's collection.

=collection: This command lists the animals in a user's collection

=help: Lists out the different animals and their corresponding emotes

=whale: Sends information about a past whale sighting via

How we built it

Using the and JSON library, we made a discord bot that is intended to randomly spawn animals in, and the first user to collect the animal has it added to their collection. Because the data is stored in a .json file, the bot retains user data even if it goes offline. Additionally, we decided to use an online API ( after learning about it in one of the workshops.

Challenges we ran into

To bring a sense of urgency in responses, we added a timeout of 7 seconds and rarity to each of the animals as well. Integrating the rarity icons and text with the animals in the database was a challenging portion. Because the list of animals and rarity stays the same, we opted to keep it in a list to avoid working with another .json file.

Accomplishments that we're proud of

We're proud of how we were able to record user data using JSON files, in addition to a random spawning function that worked successfully with our collection system.

What we learned

We learned how to manipulate and access JSON file data, use REST APIs through the Request library, and work with the Discord bot framework in Python.

What's next for Koi Bot

We're hoping to develop a leaderboard/point system for users when they collect animals, as well as a shop system where users can spend points on special items for their collection.

Built With

Share this project: