diff options
Diffstat (limited to 'bot/src/events/ThreadListSync.js')
| -rw-r--r-- | bot/src/events/ThreadListSync.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bot/src/events/ThreadListSync.js b/bot/src/events/ThreadListSync.js new file mode 100644 index 0000000..00657e6 --- /dev/null +++ b/bot/src/events/ThreadListSync.js @@ -0,0 +1,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)); + } + }); + } +}; |
