1 2 3 4 5 6 7 8 9 10 11 12 13
import { Events } from 'discord.js'; export default { name: Events.ThreadListSync, async execute(threads) { await threads.forEach(thread => { if (!thread.members.cache.has(threads.client.user.id)) { thread.join() .catch(error => console.error(`[X] Failed to join thread ${thread.name}:`, error)); } }); } };