The story of u/AnEmojipastaBot

2019-09-29

A Reddit bot whose function was to turn comments into emojipasta.

Tags: web

<< previousnext >>

u/AnEmojipastaBot was a Reddit bot inspired by r/emojipasta. The idea was simple: turn the comments of other users into emojipasta, on request.

For example...

u/JohnDoe1: it's getting hot in here

u/JohnDoe2: u/anemojipastabot

u/AnEmojipastaBot: it's getting hot ๐Ÿ”ฅ๐Ÿ˜ in ๐Ÿ”ฝ๐Ÿ‘ here ๐Ÿ’ช๐Ÿ‘

The bot was a surprise hit, spreading across the entire website and acquiring 30k upvotes (or "karma") in a handful of days. Reddit users and other bots broke it quickly in a number of surprising and amusing ways:

These bugs were squashed, however, and everything began to run smoothly. Here are the most popular comments of the bot from those carefree days.

Eventually, the bot made enemies with too many important people and its account was banned permanently. For being spammy and annoying, apparently. Nobody could have seen it coming.

It was fun while it lasted, however, and rather than let the code go to waste, I recently resurrected it as a web app.

For the interested, here's a brief description of how it worked (and how it still works in the web app). I wrote a script to download a few thousand comments off r/emojipasta. These were used to create "mappings" from words to the emojis that tend to appear beside them. When it was summoned, the bot broke up comments into chunks of text and emojis were inserted randomly between the chunks using the word->emoji mappings, with a maximum of 2 emojis after each chunk. Only the alphanumeric prefix of each chunk of text was considered, so that "I'll" would give the same emoji mappings as "I".

That's about it. The code was pretty simple. The original source code of the bot, in Python, can be found here. The JavaScript version that I ported recently can be found here.


<< previousnext >>

I'd be happy to hear from you at galligankevinp@gmail.com.