! GhostvOne.tv 👻🇫🇷
! GhostvOne.tv 👻🇫🇷
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by ! GhostvOne.tv 👻🇫🇷 on 6/29/2023 in #djs-questions
fetchStarterMessage on threadCreate doesn't work
I'm trying to fetch the first message when a thread (in a forum) is created. But it doesn't work. How can i Do ?
const { Events, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js');
const { getProjectCategories } = require('../managers/projectCategories');


module.exports = {
name: Events.ThreadCreate,
async execute(ThreadChannel) {
turn
}

setTimeout(async () => {
const Message = await ThreadChannel.fetchStarterMessage();
console.log(Message.content)
},5000)

ThreadChannel.fetchStarterMessage().then(Message => {
console.log(Message.content)
})
};
const { Events, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js');
const { getProjectCategories } = require('../managers/projectCategories');


module.exports = {
name: Events.ThreadCreate,
async execute(ThreadChannel) {
turn
}

setTimeout(async () => {
const Message = await ThreadChannel.fetchStarterMessage();
console.log(Message.content)
},5000)

ThreadChannel.fetchStarterMessage().then(Message => {
console.log(Message.content)
})
};
10 replies
DIAdiscord.js - Imagine an app
Created by ! GhostvOne.tv 👻🇫🇷 on 6/29/2023 in #djs-questions
ActionRowBuilder in a new thread
Hello, how can I make an Action rows just after a thread creation ? I would like to moderate them and add after each new thread a row with two buttons ACCEPT / DECLINE. I'm looking into ActionRowBuilder but I don't know how to send that. is that the correct way to do ? Thanks (Another question : why the doc is so empty ?? Older docs was better to understand)
16 replies