2019-11-15 16:59:50 +00:00
|
|
|
const Twit = require("twit");
|
2020-02-19 22:46:50 +00:00
|
|
|
const database = require("../utils/database.js");
|
2019-11-15 16:59:50 +00:00
|
|
|
const T = new Twit({
|
|
|
|
consumer_key: process.env.TWITTER_KEY,
|
|
|
|
consumer_secret: process.env.CONSUMER_SECRET,
|
|
|
|
access_token: process.env.ACCESS_TOKEN,
|
|
|
|
access_token_secret: process.env.ACCESS_SECRET
|
|
|
|
});
|
2019-11-18 01:57:12 +00:00
|
|
|
exports.client = T;
|
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];
|
|
|
|
});
|