Baby's First Twitter Bot
Updated:
About 1 min reading time
Tags that this post has been filed under.
This post was migrated from my previous blog managed by an old CMS. Some parts may be broken or poorly formatted, images may be missing, etc. Feel free to report an issue.
If you've followed me on Twitter for a while, you may have noticed there's a series of hashtags I like to use when quoting people in my life. Specifically, I like to take quotes out of context that make them pretty amusing. Whether or not this works depends on whether or not your sense of humor is as odd as mine. The hashtags I like to use are (click to see examples):
Since graduating college, I don't expect to be using #ThingsMyProfessorSays very often any more, but the last two I expect will still be regularly used. The last one I use most frequently these days, and my coworkers are well aware. They occasionally call out things other people in the office say for me to tweet what was said. After a while, I decided a fun tiny project would be to learn how to make my own Twitter bot to retweet any tweets with the hashtag "ThingsMyCoworkersSay". So that's exactly what I've done.
It's very simple, built in Node with the excellent Twit library. Even better: I've made it open source! I expect to (some day) expand its capabilities to do things like notify me when the account gets rate limited or if it crashes, filter for slight variations of the hashtag, or make it automatically reply to mentions.
For now, a simple retweet bot is enough. Feel free to submit a pull request on Github, or just give the account a follow @coworkerssaybot. And of course, if your coworkers say funny things like mine do, tweet it with #ThingsMyCoworkersSay!