Removed Twitter bot

This commit is contained in:
TheEssem 2021-03-08 10:37:43 -06:00
parent 8c760a527d
commit 03aa3b3a2b
11 changed files with 1 additions and 185 deletions

View file

@ -7,7 +7,6 @@ exports.load = async (command, soundStatus) => {
if (props.requires === "google" && process.env.GOOGLE === "") return logger.log("info", `Google info not provided in config, skipped loading command ${command}...`);
if (props.requires === "cat" && process.env.CAT === "") return logger.log("info", `Cat API info not provided in config, skipped loading command ${command}...`);
if (props.requires === "mashape" && process.env.MASHAPE === "") return logger.log("info", `Mashape/RapidAPI info not provided in config, skipped loading command ${command}...`);
if (props.requires === "twitter" && process.env.TWITTER === "false") return logger.log("info", `Twitter bot disabled, skipped loading command ${command}...`);
if (props.requires === "sound" && soundStatus) return logger.log("info", `Failed to connect to some Lavalink nodes, skipped loading command ${command}...`);
collections.commands.set(command.split(".")[0], props.run);
collections.info.set(command.split(".")[0], {

View file

@ -34,28 +34,6 @@ exports.clean = async (text) => {
return text;
};
// get random tweet to post
exports.getTweet = async (tweets, reply = false, isDownload = false) => {
const randomTweet = this.random(reply ? (isDownload ? tweets.download : tweets.replies) : tweets.tweets);
if (randomTweet.match("{{message}}")) {
return randomTweet.replaceAll("{{message}}", await this.getRandomMessage());
} else {
return randomTweet
.replaceAll("{{media}}", () => {
return this.random(tweets.media);
})
.replaceAll("{{games}}", () => {
return this.random(tweets.games);
})
.replaceAll("{{phrases}}", () => {
return this.random(tweets.phrases);
})
.replaceAll("{{characters}}", () => {
return this.random(tweets.characters);
});
}
};
exports.getRandomMessage = async () => {
const messages = await client.guilds.get("631290275456745502").channels.get("631290275888627713").getMessages(50);
const randomMessage = this.random(messages);

View file

@ -1,10 +0,0 @@
const Twitter = require("node-tweet");
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;
exports.tweets = require("../tweets.json");