Last active
June 25, 2020 11:01
-
-
Save ickas/85f6967cde596e894986addf1f62cdab 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
var Twit = require("twit"); | |
var T = new Twit({ | |
consumer_key: "####", | |
consumer_secret: "####", | |
access_token: "####", | |
access_token_secret: "####", | |
}); | |
var stream = T.stream("statuses/filter", { | |
track: ["hey invite", "hey code", "#hey", "hey.com"], | |
}); | |
console.log("hunter bot started"); | |
stream.on("tweet", function (tweet) { | |
bingoTweet = tweet.text.match(/\b[A-z0-9]{7}\b/g); | |
console.log(tweet.text); | |
if (bingoTweet != null) { | |
console.log("🔥 " + bingoTweet + "\n"); | |
} | |
console.log(""); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment