ThreadUpdate

const inactiveThreads = await threadchl.threads.fetchArchived()
inactiveThreads.threads.forEach(async (thread) => {
if (!thread.archived) {
await thread.send('This thread has been reopened. Please use </get-help:1084975333968707685>')
}
})
const inactiveThreads = await threadchl.threads.fetchArchived()
inactiveThreads.threads.forEach(async (thread) => {
if (!thread.archived) {
await thread.send('This thread has been reopened. Please use </get-help:1084975333968707685>')
}
})
i got this but message dont send if i send a message in a closed post making it active agian, using threadUpdate event. im trying to have it send the message if a closed thread is reopened
4 Replies
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
Baconburger998
Baconburger99815mo ago
if you can ping me in your response that would be appriceated
Apokalypt
Apokalypt15mo ago
inactiveThreads contains all archived threads fetched so the property <Thread>.archived will always be true for all threads fetched. Therefore, the rest of your code cannot be executed because as <Thread>.archived will always be true, !<Thread>.archived will always be false and you will never fall in the IF condition
Baconburger998
Baconburger99815mo ago
so what could I do to do this im trying to send a message if a archived thread re-opens that would be the if statement, correct? nvm figured it out