mrmBot-Matrix/utils/twitter.js

14 lines
457 B
JavaScript
Raw Normal View History

const Twitter = require("node-tweet");
2020-02-19 22:46:50 +00:00
const database = require("../utils/database.js");
const client = new Twitter({
consumerKey: process.env.TWITTER_KEY,
consumerSecret: process.env.CONSUMER_SECRET,
accessToken: process.env.ACCESS_TOKEN,
accessSecret: process.env.ACCESS_SECRET
});
exports.client = client;
exports.active = false;
2020-02-19 22:46:50 +00:00
database.tweets.find({ enabled: true }, (error, docs) => {
if (error) throw error;
exports.tweets = docs[0];
});