Don't reply to blocked users on Twitter bot
This commit is contained in:
parent
ced12f2429
commit
1fddd58059
1 changed files with 2 additions and 1 deletions
|
@ -35,6 +35,7 @@ module.exports = async () => {
|
|||
|
||||
// tweet stuff
|
||||
if (twitter !== null && twitter.active === false) {
|
||||
const blocks = await twitter.client.get("blocks/ids");
|
||||
const tweet = async () => {
|
||||
const tweets = (await database.tweets.find({ enabled: true }).exec())[0];
|
||||
const tweetContent = await misc.getTweet(tweets);
|
||||
|
@ -57,7 +58,7 @@ module.exports = async () => {
|
|||
track: `@${process.env.HANDLE}`
|
||||
});
|
||||
stream.on("tweet", async (tweet) => {
|
||||
if (tweet.user.screen_name !== "esmBot_") {
|
||||
if (tweet.user.screen_name !== "esmBot_" && !blocks.data.ids.includes(tweet.user.id_str)) {
|
||||
const tweets = (await database.tweets.find({ enabled: true }).exec())[0];
|
||||
let tweetContent;
|
||||
if (tweet.text.includes("@this_vid") || tweet.text.includes("@DownloaderBot") || tweet.text.includes("@GetVideoBot") || tweet.text.includes("@DownloaderB0t") || tweet.text.includes("@thisvid_")) {
|
||||
|
|
Loading…
Reference in a new issue