Created
August 8, 2016 07:07
-
-
Save ollybritton/c611d40b71685a03a816858582af7741 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Twit = require('twit'); | |
const config = require('./config'); | |
const T = new Twit(config); | |
const badThingsToSay = [ | |
'What font do you use?', | |
'Hello, whats the name of the font you use font?', | |
'Hey Wes, what\'s the name of that weird font you use?', | |
'Weird font that you use. Mind telling me what it\'s called?', | |
'What is the name of the font you use................ I\'ve never seen it before...', | |
'Dat font dou. Just watched a couple of tutorials and saw what font you have. What\'s it called???????.', | |
]; | |
const badEmojis = ['ππ²', 'π₯π ', 'ππ΅', 'ππ‘', 'ππ', 'πβ', 'ππ', 'πβ', 'ππ', 'ππͺ', 'βοΈπ¬', 'ππ·', 'ππΉ', 'ππ€', 'π·π', 'ππ³']; | |
function buildTweet() { | |
// get a random emoji | |
const emoji = badEmojis[Math.floor(Math.random() * badEmojis.length)]; | |
// get a random sentence | |
const sentence = badThingsToSay[Math.floor(Math.random() * badThingsToSay.length)]; | |
return `${sentence} ${emoji}`; | |
} | |
const stream = T.stream('statuses/filter', { track: 'llimpingllama font' }); | |
stream.on('tweet', (tweet) => { | |
console.log(tweet); | |
const createdTweet = { | |
status: `@${tweet.user.screen_name} ${buildTweet()}`, | |
in_reply_to_status_id: tweet.id_str | |
}; | |
T.post('statuses/update', createdTweet, (err, response) => { | |
console.log(response); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment