WreckNoFear
WreckNoFear
DIAdiscord.js - Imagine an app
Created by WreckNoFear on 10/30/2024 in #djs-questions
Thread fetchStarterMessage with Attachments
Working on a bot that detects when a thread is created in a particular forum, and then returns the first starter message (original post message created by OP). All works well with the code below, until an image is uploaded in which I get the error: DiscordAPIError[10008]: Unknown Message. Is there a way for me to get the image data (e.g. a link to it) when the message is created? My guess is that the message is taking longer to generate since there is a attachment included. How can I resolve this? Thanks.
const { ChannelType } = require("discord.js");

module.exports = {
name: "threadCreate",
async execute(thread, client) {
if (thread.type === ChannelType.PublicThread && thread.parentId === process.env.BUG_FORUM_ID) {
const message = await thread.fetchStarterMessage();
console.log(message);
}
},
};
const { ChannelType } = require("discord.js");

module.exports = {
name: "threadCreate",
async execute(thread, client) {
if (thread.type === ChannelType.PublicThread && thread.parentId === process.env.BUG_FORUM_ID) {
const message = await thread.fetchStarterMessage();
console.log(message);
}
},
};
9 replies
DIAdiscord.js - Imagine an app
Created by WreckNoFear on 8/20/2022 in #djs-questions
Add a role to a message author
4 replies
DIAdiscord.js - Imagine an app
Created by WreckNoFear on 8/4/2022 in #djs-voice
Getting- Cannot destroy VoiceConnection - it has already been destroyed
71 replies
DIAdiscord.js - Imagine an app
Created by WreckNoFear on 8/3/2022 in #djs-voice
Receiving error 'Cannot destroy VoiceConnection - it has already been destroyed'
27 replies
DIAdiscord.js - Imagine an app
Created by WreckNoFear on 8/2/2022 in #djs-voice
Not playing audio.
2 replies
DIAdiscord.js - Imagine an app
Created by WreckNoFear on 7/31/2022 in #djs-questions
How to get the content of a message?
I'm trying to get the content of a message from the 'messageCreate' event. Any ideas?
27 replies