This commit is contained in:
Talor Berthelson
2016-06-25 03:07:02 -04:00
parent 17e78cbe66
commit 5cf04042c9
3 changed files with 44 additions and 13 deletions

11
app.js
View File

@@ -14,12 +14,15 @@ var T = new Twit({
// filter the public stream by english tweets containing `#apple` // filter the public stream by english tweets containing `#apple`
// //
var stream = T.stream('statuses/filter', { follow: '25073877, 1339835893, 179932936, 6160792, 2853461537' }) var stream = T.stream('statuses/filter', { follow: '25073877, 1339835893, 179932936, 6160792, 2853461537, 1214598626' })
stream.on('tweet', function (tweet) { stream.on('tweet', function (tweet) {
if (tweet.user.screen_name === 'realDonaldTrump') { if (tweet.user.screen_name === 'AwfulJack') {
var b64content = fs.readFileSync('./pics/trump.gif', { encoding: 'base64' }) var trumpmessages = session.object.trump;
var trumpmessages = session.object.trumpmessages;
var randomtrumpmessage = trumpmessages[Math.floor(Math.random() * trumpmessages.length)]; var randomtrumpmessage = trumpmessages[Math.floor(Math.random() * trumpmessages.length)];
var trumpmessage = randomtrumpmessage.pluck('message');
var trumpgif = randomtrumpmessage.pluck('gif');
var b64content = fs.readFileSync(trumpgif, { encoding: 'base64' })
// first we must post the media to Twitter // first we must post the media to Twitter
T.post('media/upload', { media_data: b64content }, function (err, data, response) { T.post('media/upload', { media_data: b64content }, function (err, data, response) {

View File

@@ -1,13 +1,41 @@
{ {
"trumpmessages": [ "trump": [
"Delete your account.", {
"Trump smells bad.", "message": "Delete your account.",
"You're gonna lose, cheeto monster!", "gif": "./pics/trump.gif"
"HAHAHAHAHAHA", },
"What a terrible tweet!", {
"Nope!", "message": "Trump smells bad.",
"Donald Dump", "gif": "./pics/trump.gif"
"Tronald Dump" },
{
"message": "You're gonna lose, cheeto monster!",
"gif": "./pics/trump.gif"
},
{
"message": "HAHAHAHAHAHA",
"gif": "./pics/trump.gif"
{
"message": "What a terrible tweet!",
"gif": "./pics/trump.gif"
},
{
"message": "Nope!",
"gif": "./pics/trump.gif"
},
{
"message": "Donald Dump",
"gif": "./pics/trump.gif"
},
{
"message": "Tronald Dump",
"gif": "./pics/trump.gif"
},
{
"message": "Shut the FUCK up, Donny"
"gif": "./pics/donny.gif"
}
], ],
"hillarymessages": [ "hillarymessages": [
"Release the Benghazi emails!", "Release the Benghazi emails!",

BIN
pics/donny.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 972 KiB