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.
5 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!yep youre 100% right
wrapped it in a setTimeout and it worked
is there a better way to do that though then specifying for it to timeout say 3 seconds
i guess there isnt necessarily anything wrong with it
I don't think, i faced similar thing before when my bot used to send message on each new thread. Sometimes, the starter message gets delayed
ah fair, all good then thank you for that!