From 641cea664c124434bba21f6ab66a960732044bd3 Mon Sep 17 00:00:00 2001 From: TheEssem Date: Sun, 29 Dec 2019 15:11:58 -0600 Subject: [PATCH] Made the twitter bot not reply to blocked users (for real this time) --- events/ready.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/events/ready.js b/events/ready.js index 92ecd19..ded8c8c 100644 --- a/events/ready.js +++ b/events/ready.js @@ -35,7 +35,8 @@ module.exports = async () => { // tweet stuff if (twitter !== null && twitter.active === false) { - const blocks = await twitter.client.get("blocks/ids"); + const blocks = await twitter.client.get("blocks/ids", { stringify_ids: true }); + console.log(blocks.data); const tweet = async () => { const tweets = (await database.tweets.find({ enabled: true }).exec())[0]; const tweetContent = await misc.getTweet(tweets); @@ -58,6 +59,7 @@ module.exports = async () => { track: `@${process.env.HANDLE}` }); stream.on("tweet", async (tweet) => { + console.log(tweet.user.id_str); 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;