From 8a0dc705ec661fe6e3d0f485f988187b237ee670 Mon Sep 17 00:00:00 2001 From: Beanie <62057938+BeanieMen@users.noreply.github.com> Date: Sat, 17 Feb 2024 09:41:12 +0000 Subject: [PATCH] fix: stuff --- index.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/index.ts b/index.ts index c21e09cba..b4c4ea2d3 100644 --- a/index.ts +++ b/index.ts @@ -57,9 +57,10 @@ async function main() { const devpoolIssue = getIssueByLabel(devpoolIssues, `id: ${projectIssue.node_id}`); if (devpoolIssue) { if (projectIssue.state == "closed") { - if (twitterMap[projectIssue.node_id]) { - await twitter.deleteTweet(twitterMap[projectIssue.node_id]); - delete twitterMap[projectIssue.node_id]; + if (twitterMap[devpoolIssue.node_id]) { + await twitter.deleteTweet(twitterMap[devpoolIssue.node_id]); + delete twitterMap[devpoolIssue.node_id]; + console.log(`Successfully deleted tweet with id ${twitterMap[devpoolIssue.node_id]}`); await writeFile("./twitterMap.json", JSON.stringify(twitterMap)); } }