Sometimes you just get extremely bored and feel like coding a Twitter bot. Sometimes you just happen to have LeafyIsHere playing in the background. Okay, maybe that’s just a me thing… but I still did this. Leafy may not be here, but this Twitter bot’s job is to tell you everything that Leafy is – every hour, every day.
The bot is, in fact, open-source on GitHub as well. I wrote it in Node.js as my first ever Twitter bot. I was inspired by bots like “Fuck Every Word,” “Tube,” and “Everything Did 9/11,” which sometimes tweeted some hilarious gems. I know that there were also some Leafy memes way back in the day when he was active, that followed a similar fashion – so this is partially that.
From a technical perspective, all the bot does is download a text file off of GitHub containing a list of half a million English words. I have no idea what’s in that list. However I am applying some filters on it to make sure the bot isn’t too spammy.
As of writing, the bot is able to tweet every single hour, once. It keeps track of every word, which I refer to as a “leafy,” that it has tweeted already. It won’t tweet a duplicate. This is also because Twitter’s API will yell at you if you try to tweet the same thing twice. I also do not allow it to tweet anything that starts with a number, eliminating future posts like this:
Since I’m the one paying for the bot’s server, I plan to fund this meme until the bot says Leafy is here. It….might take a while, and it might cost a few thousand dollars after it’s done…..oh well. It’ll be WELL worth it to see that tweet. Also, this is a thing.