John Flavortown banner

John Flavortown

7 devlogs
7h 15m 27s

a discord bot that functions similarly to my cli app (flavorlinetool).
in a place where all devs already procrastinate, a bot that reminds you of all the time you DID NOT spend earning cookies is all we need.

This project uses AI

used it for my readme and for explaining api routes

Loading README...

daw

In order for the ship to be approved, I had to make a demo mode for John.
You can test him out by clicking the demo button and joining the server,
or join from this link!
https://discord.gg/3aaSvh5sjd

Attachment
0
daw

Shipped this project!

Hours: 7.0
Cookies: 🍪 183
Multiplier: 26.16 cookies/hr

making this discord bot was definitely a bigger challenge than a simple cli, but i learned a lot, and expanded my knowledge in python.
apis are so fun to work with! the bot is hosted on a droplet, and anyone who wants can invite it and try it out.

see you on the next one!!!!!

daw

#devlog 6!!!

  • Admin tooling: added /admin cache-clear, /admin stats, /admin stats-reset, and /admin db-vacuum with access controlled by ADMIN_USER_IDS plus guild owner fallback. - - Added HTTP request metrics tracking (total/error/by service) and a cache clear helper.
  • User preferences: added a user_preferences table plus /settings view and /settings update for timezone, output visibility, and default service. Wired defaults via env config.
  • Profile cleanup: removed the “Latest Devlog” section from /profile to keep the embed focused and faster.
  • Production packaging: added Dockerfile, docker-compose, and .dockerignore, plus expanded .env.example and README deployment instructions.
Attachment
0
daw

devlog 5

can’t believe i’m already this far.
this one was very productive, i added some QOL commands like viewing your own projects, listing devlogs, and refactored the codebase a bit.

i feel like the project is nearing completion, so i expect to see you guys using it soon ;P

0
daw

hello everyone, this is a devlog written from my discord bot! i decided to try to make this feature, and as im writing this devlog, i hope it works. in this one, i focused on refactoring api requests, adding session timeouts and cache cleanup, adding thread safety and error handling for everything, as well as project creation/update, and devlog creation commands. i hope you can try the bot out soon!

Attachment
0
daw

devlog 3

this devlog is about these changes:

6a09a96 - remove stats and replace with profile

8b486d8 - features: /health command and tests

f9c9c3b - add a shared helper request with timeout and retries

basically, the old stats command was pretty much useless once i added the /profile command. it now shows your devlogged time, “favorite” project (most worked on), your pfp, slack id and some other stuff, as well as a “””“rank”””, which just takes your cookies earned and devlog time and makes up some xp and assigns you a rank.

also added a health command, which just prints the current bot version, uptime, and the database status.

lastly, i upgraded the api handling with some timeouts and graceful error handling, as well as adding some tests i can use with pytest to make sure my database is truly secure.

that’s all folks

0
daw

devlog 2

today was some great progress.
i’ve ported most of the cli functionality over to the bot, and added a new one!

Overlap
the overlap feature fetches a random user, and compares your stats in a “battle”. this can let you see how you stack up against others! in the future, i’ll add the option to battle a specific user.

key encryption
when you login, you are prompted to add your key and an encryption password. this is so the host of the bot cannot read your api keys. the password has to be used once to decrypt the keys, and they are stored in RAM for 2 hours. when 2 hours pass (or the bot restarts), you have to enter a password. this was done to make sure no leaks happen. even if a database leak DOES happen, the keys are just encrypted blobs, and you STILL need a password to decrypt the keys. i’ve paid a lot of attention to security with this one.

thanks for reading!

0
daw

new project! this one will be pretty similar to flavorlinetool, as i loved the idea of a discord bot as well.
in this hour, i mostly copied over some api logic from the cli to save some time, but i also had to add some other little quirks. for example, logging in isn’t as simple on a global, public bot as it is on a local cli. on the cli, the keys were stored in json files on your pc. this time around, i create an sqlite database file on the bot host machine, which holds your keys in a secure, encrypted format. the caveat is that every time you wish to use it, you need to type in a password that you set upon logging in. i will try to find a way around this some time.

0