For the winter show I decided to make a twitter bot that tweets like Donald Trump. Why? Well (a) it is super fun to troll Trump and (b) it is a strange experience to be at the receiving end of vicious tweets, the kind that Trump sends out, and it gives you a pause to think about what it does to the public discourse.
So the idea is that if someone interacts with the bot @donalreal, the bot replies with a Trump style tweet mentioning you in that tweet. The bot is live even now although I have stopped updating the tweets.
You can go to twitter and follow @donalreal or tweet at this handle to get your own Trump tweet.
Some pictures from the show:
Here’s the bot
Here is the code
Here’s how it works
- This bot reacts when you follow it or tweet at it.
- For the winter show, it will also respond when you tweet @ITP_NYU
- It maintains a database of all such people who have fallen in his radar because of one of the above three events.
- The information about the user that it stores right now is name, screen name, description, image url, followers count, favorite count and status count. Each member is also given a good nickname and a bad nickname.
- The way it tweets back is that it chooses a template tweet from a huge list and replaces the variables in the template with information received from the user.
- Node.js https://nodejs.org/en/
- Express npm package https://www.npmjs.com/package/express
- Twit package https://github.com/ttezel/twit
- Deployed on Heroku https://dashboard.heroku.com/
- I would like to add sentiment analysis and some AI for it to respond in a more smart way
- The statements are still hard coded right now, I would like them to generate programmatically
- Troll Donald Trump
Special shout out to Daniel Shiffman and his awesome video series. Everything I did in this technologically has come from this playlist by him