mirror of
https://github.com/thewesker/bug-em.git
synced 2025-12-20 20:21:05 -05:00
lmao
This commit is contained in:
58
app.js
58
app.js
@@ -14,7 +14,7 @@ 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, 216776631, 179932936' })
|
var stream = T.stream('statuses/filter', { follow: '25073877, 1339835893, 216776631, 179932936, 111216929, 95713333' })
|
||||||
stream.on('tweet', function (tweet) {
|
stream.on('tweet', function (tweet) {
|
||||||
if (tweet.user.screen_name === 'realDonaldTrump') {
|
if (tweet.user.screen_name === 'realDonaldTrump') {
|
||||||
var b64content = fs.readFileSync('./pics/trump.gif', { encoding: 'base64' })
|
var b64content = fs.readFileSync('./pics/trump.gif', { encoding: 'base64' })
|
||||||
@@ -35,7 +35,6 @@ T.post('media/upload', { media_data: b64content }, function (err, data, response
|
|||||||
if (!err) {
|
if (!err) {
|
||||||
// now we can reference the media and post a tweet (media will attach to the tweet)
|
// now we can reference the media and post a tweet (media will attach to the tweet)
|
||||||
var params = {in_reply_to_status_id: nameID, status: '@' + name + ' ' + randomtrumpmessage, media_ids: [mediaIdStr] }
|
var params = {in_reply_to_status_id: nameID, status: '@' + name + ' ' + randomtrumpmessage, media_ids: [mediaIdStr] }
|
||||||
var DMparams = {user_id: '34867699', text: 'I tweeted ' + randomtrumpmessage + ' at ' + name, media_ids: [mediaIdStr] }
|
|
||||||
|
|
||||||
T.post('statuses/update', params, function (err, data, response) {
|
T.post('statuses/update', params, function (err, data, response) {
|
||||||
console.log("Replied to Trump's Tweet with " + randomtrumpmessage)
|
console.log("Replied to Trump's Tweet with " + randomtrumpmessage)
|
||||||
@@ -62,7 +61,6 @@ T.post('media/upload', { media_data: b64content }, function (err, data, response
|
|||||||
if (!err) {
|
if (!err) {
|
||||||
// now we can reference the media and post a tweet (media will attach to the tweet)
|
// now we can reference the media and post a tweet (media will attach to the tweet)
|
||||||
var params = {in_reply_to_status_id: nameID, status: '@' + name + " " + randomhillarymessage, media_ids: [mediaIdStr] }
|
var params = {in_reply_to_status_id: nameID, status: '@' + name + " " + randomhillarymessage, media_ids: [mediaIdStr] }
|
||||||
var DMparams = {user_id: '34867699', text: 'I tweeted ' + randomtrumpmessage + ' at ' + name, media_ids: [mediaIdStr] }
|
|
||||||
|
|
||||||
T.post('statuses/update', params, function (err, data, response) {
|
T.post('statuses/update', params, function (err, data, response) {
|
||||||
console.log("Replied to Hillary's Tweet with " + randomhillarymessage)
|
console.log("Replied to Hillary's Tweet with " + randomhillarymessage)
|
||||||
@@ -89,7 +87,6 @@ T.post('media/upload', { media_data: b64content }, function (err, data, response
|
|||||||
if (!err) {
|
if (!err) {
|
||||||
// now we can reference the media and post a tweet (media will attach to the tweet)
|
// now we can reference the media and post a tweet (media will attach to the tweet)
|
||||||
var params = {in_reply_to_status_id: nameID, status: '@' + name + " " + randomberniemessage, media_ids: [mediaIdStr] }
|
var params = {in_reply_to_status_id: nameID, status: '@' + name + " " + randomberniemessage, media_ids: [mediaIdStr] }
|
||||||
var DMparams = {user_id: '34867699', text: 'I tweeted ' + randomtrumpmessage + ' at ' + name, media_ids: [mediaIdStr] }
|
|
||||||
|
|
||||||
T.post('statuses/update', params, function (err, data, response) {
|
T.post('statuses/update', params, function (err, data, response) {
|
||||||
console.log("Replied to Bernie's Tweet with " + randomberniemessage)
|
console.log("Replied to Bernie's Tweet with " + randomberniemessage)
|
||||||
@@ -116,7 +113,6 @@ T.post('media/upload', { media_data: b64content }, function (err, data, response
|
|||||||
if (!err) {
|
if (!err) {
|
||||||
// now we can reference the media and post a tweet (media will attach to the tweet)
|
// now we can reference the media and post a tweet (media will attach to the tweet)
|
||||||
var params = {in_reply_to_status_id: nameID, status: '@' + name + " " + randomhulkmessage, media_ids: [mediaIdStr] }
|
var params = {in_reply_to_status_id: nameID, status: '@' + name + " " + randomhulkmessage, media_ids: [mediaIdStr] }
|
||||||
var DMparams = {user_id: '34867699', text: 'I tweeted ' + randomtrumpmessage + ' at ' + name, media_ids: [mediaIdStr] }
|
|
||||||
|
|
||||||
T.post('statuses/update', params, function (err, data, response) {
|
T.post('statuses/update', params, function (err, data, response) {
|
||||||
console.log("Replied to Hulk's Tweet with " + randomhulkmessage)
|
console.log("Replied to Hulk's Tweet with " + randomhulkmessage)
|
||||||
@@ -124,5 +120,57 @@ T.post('media/upload', { media_data: b64content }, function (err, data, response
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
if (tweet.user.screen_name === 'DrJillStein') {
|
||||||
|
var b64content = fs.readFileSync('./pics/hulk.gif', { encoding: 'base64' })
|
||||||
|
var jillmessages = session.object.jillmessages;
|
||||||
|
var randomjillmessage = jillmessages[Math.floor(Math.random() * jillmessages.length)];
|
||||||
|
// first we must post the media to Twitter
|
||||||
|
T.post('media/upload', { media_data: b64content }, function (err, data, response) {
|
||||||
|
// now we can assign alt text to the media, for use by screen readers and
|
||||||
|
// other text-based presentations and interpreters
|
||||||
|
var mediaIdStr = data.media_id_string
|
||||||
|
var altText = "There isn't actually much point to this but whatever"
|
||||||
|
var meta_params = { media_id: mediaIdStr, alt_text: { text: altText } }
|
||||||
|
var nameID = tweet.id_str;
|
||||||
|
var name = tweet.user.screen_name;
|
||||||
|
|
||||||
|
T.post('media/metadata/create', meta_params, function (err, data, response) {
|
||||||
|
if (!err) {
|
||||||
|
// now we can reference the media and post a tweet (media will attach to the tweet)
|
||||||
|
var params = {in_reply_to_status_id: nameID, status: '@' + name + " " + randomjillmessage, media_ids: [mediaIdStr] }
|
||||||
|
|
||||||
|
T.post('statuses/update', params, function (err, data, response) {
|
||||||
|
console.log("Replied to Jill Stein's Tweet with " + randomjillmessage)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (tweet.user.screen_name === 'GovGaryJohnson') {
|
||||||
|
var b64content = fs.readFileSync('./pics/gary.gif', { encoding: 'base64' })
|
||||||
|
var garymessages = session.object.garymessages;
|
||||||
|
var randomgarymessage = garymessages[Math.floor(Math.random() * garymessages.length)];
|
||||||
|
// first we must post the media to Twitter
|
||||||
|
T.post('media/upload', { media_data: b64content }, function (err, data, response) {
|
||||||
|
// now we can assign alt text to the media, for use by screen readers and
|
||||||
|
// other text-based presentations and interpreters
|
||||||
|
var mediaIdStr = data.media_id_string
|
||||||
|
var altText = "There isn't actually much point to this but whatever"
|
||||||
|
var meta_params = { media_id: mediaIdStr, alt_text: { text: altText } }
|
||||||
|
var nameID = tweet.id_str;
|
||||||
|
var name = tweet.user.screen_name;
|
||||||
|
|
||||||
|
T.post('media/metadata/create', meta_params, function (err, data, response) {
|
||||||
|
if (!err) {
|
||||||
|
// now we can reference the media and post a tweet (media will attach to the tweet)
|
||||||
|
var params = {in_reply_to_status_id: nameID, status: '@' + name + " " + randomgarymessage, media_ids: [mediaIdStr] }
|
||||||
|
|
||||||
|
T.post('statuses/update', params, function (err, data, response) {
|
||||||
|
console.log("Replied to Gary Johnson's Tweet with " + randomgarymessage)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
10
config.json
10
config.json
@@ -22,6 +22,16 @@
|
|||||||
"You’re a thin-skinned racist baby.",
|
"You’re a thin-skinned racist baby.",
|
||||||
"You're a terrible father.",
|
"You're a terrible father.",
|
||||||
"You never got your win back from Yokozuna."
|
"You never got your win back from Yokozuna."
|
||||||
|
],
|
||||||
|
"jillmessages": [
|
||||||
|
"Your tweets are as worthless as a vote for you.",
|
||||||
|
"You'll never be president.",
|
||||||
|
"No spoilers, please."
|
||||||
|
],
|
||||||
|
"garymessages": [
|
||||||
|
"Your tweets are as worthless as a vote for you.",
|
||||||
|
"You'll never be president.",
|
||||||
|
"No spoilers, please."
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
pics/gary.gif
Normal file
BIN
pics/gary.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 MiB |
BIN
pics/jill.gif
Normal file
BIN
pics/jill.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1018 KiB |
Reference in New Issue
Block a user