Automatically revive archived threads

Hello, I'm trying to do a simple thing. When a forum post gets archived, then automatically unarchive it.
client.on("threadUpdate", async (thread, oldThread) => {
if (thread.archived && !oldThread.archived) {
await thread.setArchived(false);
}
});
client.on("threadUpdate", async (thread, oldThread) => {
if (thread.archived && !oldThread.archived) {
await thread.setArchived(false);
}
});
However, when testing i'm right clicking the post and then doing the "Close post" action, which doesn't get picked up by the bot. Is threadUpdate the right event to use?
2 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
kibubek
kibubekOP2y ago
Yes, you're right, thank you! Closing post
Want results from more Discord servers?
Add your server