stardance has been extended another month! the new deadline is october 31 :)

You are browsing as a guest. Sign up (or log in) to start making projects!

MDS

  • 7 Devlogs
  • 16 Total hours

MDS (Meme Delivery Service) is a Python Slack bot that delivers programming memes from ProgrammerHumor. It posts daily batches automatically and lets users request memes with /memes, with various search topics derived from ProgrammerHumor as well as topic search. It also includes optional AI moderation that filters memes.

Ship #1

I made MDS (Meme Delivery Service), a Python Slack bot that fetches programming memes from ProgrammerHumor! It can post a daily batch automatically, or you can use /memes to request anywhere from 1–10 memes from the home, hot, random, or search feeds. There’s also optional LLM moderation and a Show sources button that links back to the original memes!

While making this, there were quite a few moving parts to connect, such as scraping the memes, downloading the images, and uploading them to Slack. Handling errors were quite tedious aswell, including unavailable images, moderation errors, and commands used in channels where the bot hasn’t been invited.

Overall, I’m happy with how the whole posting system came together! Daily posts interweave the home and hot feeds, and you can configure the schedule, cooldowns, and moderation. Memes :)
Anyways, you, yes YOU should try it TODAY, RIGHT NOW. Just join #mds-playground on the Hack Club Slack and check the pinned message! Ty for reading this :D

  • 7 devlogs
  • 16h
  • 13.31x multiplier
Try project → See source code →
Open comments for this post

25m 3s logged

Last minute bugfixing!!!! I’m sure all of y’all had atleast one experience before where you discovered a new bug AFTER finalizing everything :heavysob: . That just happened to me when I realized if MDS isn’t in a channel, it just ghosts you and leaves a error in the console. Yeah, not great, so I added this nice little message if that happens, and also just improved a lil bit of the reliability on the slack side of things. Ready to ship, I think :ultrafastparrot:

0
0
86
Open comments for this post

6h 28m 7s logged

Spaghetti and bugs really don’t go well together. Don’t believe me? Try it out… Yeah, you see now? So that is precisely why I cleared out the spaghetti and bugs out of my code! Yes. That took a long time. :ultrafastparrot:
So basically, I reorganized the fetching, moderation, downloading, and Slack posting code so it is actually readable. I also replaced the scattered dictionaries with actual data models and cleaned up how settings are loaded and checked. Less guessing what some random variable contains. Yay!!
On the actual bot side, images now download in parallel, broken or oversized downloads get skipped, and /memes has configurable cooldowns for users and channels. I also improved the source button’s link back to the uploaded post, made the daily posting time configurable, and added separate moderation controls for daily posts and slash commands. All those boring things that suddenly become very interesting when they break :heavysob:
And last and probably least, I wrote a README with installation instructions, configuration details, and command examples, added an example .env file and license, and gave MDS a logo and banner! So now you can actually figure out how to run it without having to read through all my code first. well you probably could read it now after the refactor You’re welcome. Anyways, MDS is getting pretty close to being ready to ship!! :thumbs-up:

0
0
65
Open comments for this post

2h 25m 25s logged

Well, well, well. Look who we have here. (You, reading this devlog). So what I did this time was add the slash commands! Yay!! So basically now there is a ‘/memes’ command that lets you summon a collection of memes in your current channel! You can specify what page of ProgrammerHumor you want it from (like home, hot, random), or you can use a search query! Also I kinda messed up my git, as in my last 2 commits I forgot to actually add the files, so I guess I now have two less commits. Anyways, I also improved reliability, logging, and all those boring things.

0
0
44
Open comments for this post

2h 10m 59s logged

After getting ragebaited by LangChain for a while, I’m happy to announce that I have finally completed the LLM moderation feature. Now you can finally rest assured that the memes being sent are appropriate! It is off by default, since you obviously need an llm endpoint to use it, but it is nice to have! Later I may add a setting to control how strict the moderation is. I additionally improved the overall reliability of the app, and made it easier to use as well as easier to understand what’s going on!

0
0
41
Open comments for this post

1h 46m 56s logged

LLMs, the cause of the ram shortage, are now a vital (kinda) part of my app. So basically in the about 2 hours ish of this devlog, I managed to implement the first half of the LLM moderation & ranking feature. I first using the OpenAI API, but then switched to langchain to allow support for other API specifications! But yeah, this feature is pretty time consuming to implement… Also, the screenshot this time is just some code as I don’t wanna add yet another screenshot of the app, with the LLM feature not even implemented yet.

0
0
49
Open comments for this post

1h 11m 7s logged

Waiter waiter, more upgrades! Alright, so before I jump to the complicated stuff, I just improved the overall code structure by making it more readable and spread apart, added better logging capabilities, as well as added the core feature: scheduled meme posting, and finally, improved the source links button & overall reliability.

0
0
73
Open comments for this post

1h 20m 17s logged

Finished the basic structure of the Slack bot; I got it working and posting memes along with a basic scraper, and a sources button. This is a very basic demo for now, there is so much more to come!

0
0
52

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…