DEV Community

Transposit
Transposit

Posted on • Originally published at blog.transposit.com on

5 3

Hypebot is the hype man who never lets me down

Written by Sarah Brown

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: 🙏👏


Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

Billboard image

Try REST API Generation for Snowflake

DevOps for Private APIs. Automate the building, securing, and documenting of internal/private REST APIs with built-in enterprise security on bare-metal, VMs, or containers.

  • Auto-generated live APIs mapped from Snowflake database schema
  • Interactive Swagger API documentation
  • Scripting engine to customize your API
  • Built-in role-based access control

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay