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.
zevnda
zevnda2y ago
You mean threads in a forum channel?
Tyranasaurus
TyranasaurusOP2y ago
no, text channel threads
zevnda
zevnda2y ago
channel.threads
Tyranasaurus
TyranasaurusOP2y ago
doesn't seem to work? Not sure why
zevnda
zevnda2y 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

Did you find this page helpful?