2020-03-14 23:03:45 +00:00
|
|
|
const Twitter = require("node-tweet");
|
2020-02-19 22:46:50 +00:00
|
|
|
const database = require("../utils/database.js");
|
2020-03-14 23:03:45 +00:00
|
|
|
const client = new Twitter({
|
|
|
|
consumerKey: process.env.TWITTER_KEY,
|
|
|
|
consumerSecret: process.env.CONSUMER_SECRET,
|
|
|
|
accessToken: process.env.ACCESS_TOKEN,
|
|
|
|
accessSecret: process.env.ACCESS_SECRET
|
2019-11-15 16:59:50 +00:00
|
|
|
});
|
2020-03-14 23:03:45 +00:00
|
|
|
exports.client = client;
|
2019-11-23 23:23:28 +00:00
|
|
|
exports.active = false;
|
2020-02-19 22:46:50 +00:00
|
|
|
database.tweets.find({ enabled: true }, (error, docs) => {
|
2019-11-18 01:57:12 +00:00
|
|
|
if (error) throw error;
|
|
|
|
exports.tweets = docs[0];
|
|
|
|
});
|