FlavorBot banner

FlavorBot

21 devlogs
25h 0m 15s

A fun project to bring flavortown to discord. It is a simple discord.py bot that integrates with the flavourTown API. This is a fun project to help expand my knowledge of discord bots and put it on my portfolio.

This project uses AI

Used claude ai for code review after the whole project was done. Just to iron out any bugs that I may have missed during the process and testing

Demo Repository

Loading README...

georgegk

Ok so I nade the leaderboard using mostly the same logic as the discord version but adding an icon for each entry cause it looks way better. After that I decided to also include the page number so when you press back you return to the page of the leaderboard you left from. It was a bit hell routing it through the values of the buttons but I pulled through. I think I am mostly done with the port now that 4/4 features are here.

Attachment
Attachment
Attachment
0
georgegk

Last quick devlog of the day! Ok so I added the item specific page for the shop which was relatively easy since I ported most of the logic from the discord bot. This thing is really starting to take shape but it is getting way too late and I have to get up early tomorrow. I hope to ship within the day since 3/4 features are done! Goodnight

Attachment
0
georgegk

quick devlog time. I got the main page of the shop working with all the sort modes, page pagination, reverse… using a similar system to the back buttons. Most of the sorting logic was l ported from the discord bot, I just designed a new ui and hooked it to this classless system. That’s the big difference between this and discord.py since with discord I can just store any info I need in the classes and pass it on with tables but now I need to encode everything into strings and pass it using input values, but I am slowly getting there.

Attachment
Attachment
1

Comments

Joe
Joe 2 days ago

nice

georgegk

Nice I actually implemented the second feature extremely fast since I had ready basically all the build functions from the first feature. The back button was a bit complicated but I settled on encoding it into the button’s value and using .split(” “) when receiving the event to extract all the info. We are 2/4 done and are making great progress!!! I can’t wait to see the finished product it will look amazing!

Attachment
Attachment
Attachment
0
georgegk

I just finished building the devlog menu and I think I have gotten all the features I realistically want into this first option (explore). I am going to move on to the second option (projects) where I will finally have to confront that back button issue (let’s hope it won’t be too big of a problem this time cause last time it broke me a bit). I will get back to you with any updates I may have.

Attachment
Attachment
0
georgegk

I continued working on the explore tab adding the per project display. It wasn’t too difficult just a lot of messing around with blocks until I got smt that was both aesthetically pleasing and functional. Now I obviously need to get that menu down there to link to the devlogs and then I can continue to the other 3 features that hopefully with this setup will be absolutely no problem (I think I am just coping). Now I remember the the back button menu issue from the original version but I have decided that that is a future me problem and I won’t be paying any attention to it for the foreseeable future.

Attachment
Attachment
0
georgegk

I started work on the explore tab, it looks pretty good if you ask me, way better than the discord one. The banners where a huge addition that improved the quality of the whole bot. Now it is a bit annoying to build blocks cause even with the block kit builder sometimes it fails silently for no reason and I have to scramble to try and fix it but I think I am doing well. I got the search feature and the back button to work but not the project selector, on to that now!

Attachment
0
georgegk

Ok so I did some stuff over the past 1.5h. I changed the slack bot from sync to async to help with responses and tried to get the database to work. I spent like 5m trying to figure out why it did not save the keys and then I realized that I forgot to call init_db()🤦‍♂️. So the login system is finally working and I managed to get some basic interaction with flavortown. Now all that remains is to port the rest of the bot… (once again block kit builder is a live saver)

Attachment
Attachment
0
georgegk

Woah slack bot development is amazing! I can’t stress enough how useful block kit builder is. In discord every time you want to test an embed you gotta restart the program and do the command but with slack you have the preview right next to your editor and it updates dynamically. I have to say I am falling in love with slack it is a very good platform. Now back to our topic I managed to recreate my homepage with slack’s blocks and added icons that I host using the hackclub CDN ( thank you to whoever created that you are a godsend). Now I will look into doing the basic login stuff.

Attachment
0
georgegk

So I tried switching the slack bot’s mode from socket to http, since I want to look into deploying it with aws lambda (Those railway prices are starting to become a bit much). I got it to work after some trial and error which gives me hope I am going to get this to work. I also went from message commands to slash interactions to hopefully give users an easier way of triggering the interaction and made the response only visible to the user that requested it. I got this!

Attachment
0
georgegk

I saw some feedback asking for this bot to also be added on slack, so I decided that was a great idea and got started on that. Now have I ever created a slack bot before? No. Does that mean I won’t try to anyways? Also no. For now I have just managed to get this example working for my bot but it does have some good bones. I am sure this port won’t be too hard… right??

Attachment
0
cskartikey

Tagged your project as well cooked!

🔥 cskartikey marked your project as well cooked! As a prize for your nicely cooked project, look out for a bonus prize in the mail :)

georgegk

Shipped this project!

Hours: 13.82
Cookies: 🍪 283
Multiplier: 20.45 cookies/hr

Second time writing this (first one bugged out)
I made a discord.py bot for interacting with the flavortown platform. Browse projects, manage your own, explore items in the shop and see the leaderboard, all with one discord command. It was overall a somewhat challenging project, I really got to get into the menu navigation side of discord bot development, a thing I don’t do to often, and keeping track of every single menu and edge case while still trying to reuse functions was definitely a challenge. I implemented all the features I could think of as well as optimized the code and deployed it to railway. In total I had a lot of fun designing this project and I can’t wait to see what I will make next!
TLDR: Had a lot of fun, challenging but rewarding

georgegk

Finally wrote up the readme.md, I am excited to ship this project. I have setup the project on railway and invited the bot to my discord server so people can easily check it out. I had some difficulties with the build (it’s my first time on railway) but I got it all to work after adding the req.txt file. This project was incredibly fun (even if I took a long break in between) and I can’t wait to see what else I can make.

Attachment
0
georgegk

I am happy to announce that this project is officially ready. I just finished some last code checks, testing, formatting and passed the code through claude to make sure I didn’t miss anything. All that is left is to now deploy the project, write up the repo and ship!

Attachment
0
georgegk

Just here to make a big update. I mostly focused on adding the ability to create and modify projects through the ui and adding sorting modes, regions and reverse direction in the shop. The rest of the time I spent was polishing the code to make it more presentable, remove repetitions, fix weird behaviors, improve performance and overall prepare it for production. I think I have added all the features I need and ironed out the major problems with the code all that remains on that part is to add proper logging and replace requests with async sessions. After that all that will be left is the readme files, improving some of the previous logs, deploying the project and shipping it!

Attachment
0
georgegk

Started working on the shop interface, got some basic sorting, region setting, page pagination and item lists. I also looked into the API docs and couldn’t find any way to connect an item id to it’s upgrades without getting rate limited so I had to give up on that idea. Right now I am trying to get a menu to show each item in more detail which shouldn’t be too difficult.

Attachment
0
georgegk

I added a menu to view specific users from the leaderboard, which I will probably reuse to just let you explore and find users, which was harder than I thought since I needed to properly use my existing functions, that needed some heavy modification to have that multiuse capacity. Along the way I encountered several bugs that slowed me down, both from the new menu and from old short sightings of me, but I managed to resolve them.

Attachment
0
georgegk

I focused on making a few final bug fixes and changing all the responses to defer first since discord enforces a strict 3 second response time without it. I mostly did that and added some page pagination on the leaderboard as well as some setup to be able to view info on specific users. That’s it for the night, logging off.

Attachment
0
georgegk

Fixed a lot of bugs, added a search feature to the projects tab, finished the my projects section(for now more to come later) and finally created the first prototype of the leaderboard

Attachment
0
georgegk

I added a way to view the devlogs and made menu navigation easier by creating return buttons

Attachment
0
georgegk

I created the explore tab that shows different projects on the platform. I also made a menu to select specific projects and see the details and I am planning to also show devlogs!

Attachment
Attachment
0
georgegk

Here is our start. I have made some progress. I outlined the basic features an structure and made a menu to submit your user id and api key, which is stored and used for any requests that are made in the future. This is starting to look like a great project! (NOTE: I just saw the API update and found out that there is a @me endpoint, will integrate that for ease of use)

Attachment
0