I relativ new on discord.js with node. I’m trying to read the first message from a thread, I don’t know, as an array and save it later. Since I would like to pass on the data later via an API.
I’m breaking my crown here.
i have experimented with:
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 con´t find a way to get the wohl thread data. Maybe someone can help me out with that?
2
Answers
Maybe thats helps a bit more? really don´t know waht?
and after making the post i got this error:
Try using this code.