I added the /potatonator-explore command, which is the first real gameplay feature for Potatonator.
The idea is that users can send their potato on a random adventure. Each adventure gives the potato XP and coins.
I created a new /explore endpoint in the Cloudflare Worker and added several random events, such as finding treasure, discovering golden potatoes, finding coins, or fighting a carrot.
At first, the API only returned the XP and coins without saving them. I then added a coins column to the D1 database and updated the endpoint so the rewards are permanently saved.
There were a few small issues along the way, including accidentally trying to add the coins column twice, which resulted in a duplicate-column error. Since the first command had already worked, the second one wasn’t needed.
After testing the API locally, I connected /explore to Slack and deployed the updated Cloudflare Worker.
I also updated /potatonator-profile so it displays the coins earned from exploring.
I added the /potatonator-profile command.
The goal was to let users view the potato they adopted and all of its stats.
First, I created a new /profile endpoint in the Cloudflare Worker. It takes the user’s Slack ID and searches the D1 database for their potato.
I also connected the endpoint to index.ts so Cloudflare knows about the new route.
There was a small issue where the /profile endpoint wasn’t appearing in the API documentation. Turns out VS Code hadn’t properly saved the changes, so after saving a few more times, it worked.
I then tested the endpoint using PowerShell and confirmed that it could retrieve the saved potato.
Finally, I connected the API to the Slack bot using Axios. The bot sends the user’s Slack ID to the API, which retrieves their potato from D1 and sends the information back to Slack.
The command now displays:
🥔 Potato name
Type
Rarity
⚔️ Power
🥔 Crunch
🍀 Luck
⭐ Level
✨ XP
After testing it in Slack, /potatonator-profile worked successfully.
Potatonator now has both potato adoption and profiles, giving us the foundation for adding actual gameplay features next. 🥔
I started this project with the goal of making a Slack bot that could respond to custom slash commands. I wasn’t sure what the bot should actually do, so I decided to make it potato-themed and named it Potatonator.
I started with basic commands like:
/potatonator-ping
/potatonator-help
/potatonator-potatofact
For the potato facts, I first learned about APIs and Axios, which lets the bot make requests to an API. I originally considered using an existing API, but decided to make my own potato API instead.
I first ran the API locally, but realized that meant it wouldn’t work when my PC was turned off. I decided to move it to Cloudflare Workers, which gave me a permanent URL:
https://potatonator-api.potatonator.workers.dev
I then connected my Slack bot to this API.
After that, I wanted Potatonator to become more like a game, so I created /potatonator-adopt. Users could permanently adopt a randomly generated potato with stats such as:
Name
Type
Rarity
Power
Crunch
Luck
Level
XP
To save this information, I added a Cloudflare D1 database.
There were a few mistakes along the way. I initially ran a command from the wrong folder, and later discovered that my local D1 database didn’t have the table even though the remote database did. I also had an issue where Axios treated the “already have a potato” response as an error. After fixing these, everything worked.
Now /potatonator-adopt successfully creates a potato and remembers it even after the bot restarts.
Next, I’m planning to add /potatonator-profile, which will let users view their potato and its stats.
Created the bot on slack and then I added the code to vs code. I tested the first ping command which resulted in a success!
Retracing the PCB to allocate for the dimension requirement
Just finished Wiring the PCB, have to say, this was the hardest part so far. I was compeltely stuck until I found out what Vias were
I arranged the PCB, but might rerrange based on how it looks
I just completed the schematic for all of the LEDs. Using LEDs made my life a lot easier, its auctually crazy.
Redoing the enitre schematic because I learned about labels and this helped me get rid of all the long ahh wires
Remaking Entire Schematic because lack of GPIO pins
I am removing some switches to make room for the rotary encoders in KiCad
I have just created the matrix wiring and layout for my PotatoPad, I am learning new things as I complete the project