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 toolkit2y 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
You mean threads in a forum channel?
Tyranasaurus
TyranasaurusOP2y ago
no, text channel threads
probablyraging
channel.threads
Tyranasaurus
TyranasaurusOP2y ago
doesn't seem to work? Not sure why
probablyraging
.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
Want results from more Discord servers?
Add your server