I'm using the threadUpdate event to check when a forum post gets automatically archived. I then compare oldThread and newThread to check if it has gotten archived:
name: "threadUpdate",
async execute(oldThread, newThread) {
if (oldThread.archived === newThread.archived) return;
if (newThread.archived === true) {
//do stuff
}
}
}```
Sometimes the bot just execute what's inside the if even if it's not archived, sometimes even after a new message in an active post.
How is that even possible? Is there something I'm missing?
node: v18.12.1