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 User2y ago
Message Not Public
Sign In & Join Server To View
JollyJohn
JollyJohnOP2y ago
if you can ping me in your response that would be appriceated
Apokalypt
Apokalypt2y 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
JollyJohn
JollyJohnOP2y 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
Want results from more Discord servers?
Add your server