Skip to content

Instantly share code, notes, and snippets.

@ickas
Last active June 25, 2020 11:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ickas/85f6967cde596e894986addf1f62cdab to your computer and use it in GitHub Desktop.
Save ickas/85f6967cde596e894986addf1f62cdab to your computer and use it in GitHub Desktop.
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