Remove user from all private threads

As described - I have the user added to a private thread and want a way to remove the user from their private threads, without necessarily knowing what private threads they are currently added in.
11 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.
sexy dark chocolate
Hmm, loop through all the threadchannels in a guild, check the threadmembersmanager for the member and if they're there, remove them. Use fetch("id") on the threadmembersmanager btw
MrMythical
MrMythical2y ago
That is API spam
sexy dark chocolate
The remove method? Had a feeling it was going to be
Tyranasaurus
TyranasaurusOP2y ago
I thought they meant the fetch calls
MrMythical
MrMythical2y ago
Well... both
sexy dark chocolate
I mean, fetch only sends a request to the api if the member isn't cached, it checks the cache first so unless the member ain't cached then yeah I'd see why
d.js docs
d.js docs2y ago
method ThreadMemberManager#remove() Remove a user from the thread.
sexy dark chocolate
No not that I told him filter the channelmanager by threadchannels that include the member he wants
d.js docs
d.js docs2y ago
method ThreadManager#fetchActive() Obtains all active thread channels in the guild. This internally calls GuildChannelManager#fetchActiveThreads().
sexy dark chocolate
@tyranasaurus
Want results from more Discord servers?
Add your server