Fetching and Deleting all threads within a channel

Hello. I have the ID of a tech channel, and I want to delete all threads (active or archived) that are children of that channel. Can't seem to figure out what the syntax to make this work is.
6 Replies
d.js toolkit
d.js toolkit15mo ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
probablyraging
probablyraging15mo ago
You mean threads in a forum channel?
Tyranasaurus
Tyranasaurus15mo ago
no, text channel threads
probablyraging
probablyraging15mo ago
channel.threads
Tyranasaurus
Tyranasaurus15mo ago
doesn't seem to work? Not sure why
probablyraging
probablyraging15mo ago
.fetch() will fetch archived and unarchived, or you can do .fetchActive() and .fetchArchived() Fetch will only fetch the last 100 messages/threads, so I think if the threads are old you may need a different method