I am relatively new to discord.js and node. I'm trying to read the first message from a thread, I don't know, as an array and save it later. Because I want to pass the data via API later.
I'm breaking my crown here.
I've tried:
const { ChannelType } = require('discord.js'); client.on('threadCreate', async (thread) => { if (thread.type == ChannelType.GuildPublicThread) { // When a new forum post is created console.log(thread.parentId) // The forum channel ID console.log(thread.id) // The forum post ID console.log(thread.name) // The name of the forum post } })
But I can't find a way to get wohl thread data. Maybe someone can help me solve this problem?