Hypebot is the hype man who never lets me down

It’s the middle of our company hackweek, my project isn't working, and there's no emoji symbol for dwarf.

Sarah Brown · Mar 19, 2019

The birth of hype

It’s the middle of our company hackweek, and my hackweek project is not working. I’m trying to convert dwarf fortress release notes into emoji, but I keep hitting rate limits and — what’s maybe more detrimental — there is no emoji symbol for dwarf 🤷. I’m also vastly outnumbered in a Slack poll for what flavored waffles we’re buying for the office.

Salted Caramel Conspiracy

I know what I must do: abandon my hackweek project and write a slackbot that votes Apple Cinnamon. Unfortunately, the Slack API does not allow bots to click buttons 😒. I change tack and instead create hypebot, a bot who reacts emphatically to everything I say in slack.

And Tuan too because he’s starved for hype.

The hype-cycle

Hypebot is built using Slack’s event subscription api, with the backend running on Transposit. You can check out all of hypebot’s code here: https://console.transposit.com/t/transposit-sample/hypebot

The Transposit Console

When hypebot receives a message event from Slack, it splits the string into discrete words and looks each word up in the thesaurus. Then, armed with hundreds of synonyms, it compares each word to all potential Slack emojis. When it finds a match, it reacts. Thus the hype-cycle is complete.

Implementing this in Transposit meant I didn’t need to deploy my own server, and Transposit made it easy to keep track of bot OAuth scopes when making API calls. No infra; no auth; pure hype.

Taking it to the next level

The hype train doesn’t end here. I’ve got upcoming hypebot posts about how we addressed performance problems when things were overhype, and how we can modify hypebot for his eventual debut on the Slack app directory. Of course if you’re too hype to wait, go ahead and fork hypebot on Transposit to build your own slackbot.

Sadly hypebot can’t add claps to a medium post via the api (believe me, I checked), so you’ll just have to do this the old fashioned way: 🙏👏