Created
May 22, 2016 00:08
-
-
Save 0xbe7a/2efaed60f117ffad83eb841f0524c41b to your computer and use it in GitHub Desktop.
Miss You FoxStevenson
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
var Twit = require('twit') | |
var config = require('./config') | |
var later = require('later'); | |
var msgs = ["Miss You Fox", | |
"Rly miss you fox <3", | |
"Miss ya <3", | |
"Miss you" | |
] | |
var T = new Twit({ | |
consumer_key: config.consumer_key, | |
consumer_secret: config.consumer_secret, | |
access_token: config.access_token, | |
access_token_secret: config.access_token_secret | |
}) | |
later.setInterval(postMiss, later.parse.text('every month')) | |
function postMiss(){ | |
T.post('direct_messages/new', {screen_name: "FoxStevensonNow", text: getRanmdomMSG()}, function(){ | |
console.log("DONE.") | |
}) | |
} | |
function getRanmdomMSG(){ | |
return msgs[Math.floor(Math.random() * msgs.length - 1) + 0] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment